home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5506 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.1 KB  |  34 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!paladin.american.edu!howland.reston.ans.net!usc!cs.utexas.edu!torn!mcshub!aruba!ruby!rickt
  3. From: rickt@aruba.UUCP (Rickey Thomas Tom)
  4. Subject: help with a script files
  5. Message-ID: <1993Jan26.203636.7606@aruba.uucp>
  6. Sender: rickt@aruba (Rickey Thomas Tom)
  7. Date: Tue, 26 Jan 1993 20:36:36 GMT
  8. Organization: Project Zed
  9. Lines: 23
  10.  
  11. I a working on a script that basicaly moves files from a subdirectory to
  12. a current directory.
  13.  
  14.    .....
  15.    .....
  16. mv <dir x>/* .
  17.    .....
  18.    .....
  19.  
  20. The problem is that if there are no files in the subdirectory, the script terminates and returns an error code that says that no files were found.
  21.  
  22. I tried    if ( -e "<dir x>/* ) then
  23.                 .....
  24.  
  25. but this does not work either
  26.  
  27. Any help would be greatly appreciated. Thank you in advance
  28.  
  29. -- 
  30. --------------------------------------------------------------------------------
  31. Rickey Tom                       | Internet Style: aruba!rickt@uu2.psi.com
  32. Programmer/Analyst Project ZED   | UUCP          : ...!uunet!uupsi2!aruba!rickt
  33. --------------------------------------------------------------------------------
  34.