home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / wvwar062.zip / doc / x / helper-scripts / nsopen < prev    next >
Text File  |  2000-09-03  |  411b  |  23 lines

  1. #!/bin/tcsh
  2.  
  3. if ($#argv != 1) then
  4.     echo "Usage: $0 file"
  5.     exit 1
  6. endif
  7.  
  8. set file = $argv[1]
  9. if (!(-r $file)) then
  10.     echo "$0: File $file cannot be read"
  11.     exit 1
  12. endif
  13.  
  14. #Try to open file in an existing netscape window
  15. (netscape -remote "openFile(${file})") >& /dev/null
  16.  
  17. #if this fails, it means that netscape is not running, so start it
  18. if ($status) then
  19.   netscape -no-install file:${file}
  20. endif
  21.  
  22.  
  23.