I have a procedure that creates two files only one of theses files is created at a time depending on if there was an error or not, what I need to do is to search a specified directory and pickup the name of the file that is in there and then be able to store this a a variable so that the script can then just pass in the variable to see which script to run next.
I have tried something like this
for file in 'ls /u1/dev/procedures/sales/*.sh'; do
but all i get returned is
All I need returned is just the filename.
Do a man on
You don't need 'ls' or quotes. Try:
for file in /u1/dev/procedures/sales/*.sh
Do you have a UNIX Question?
Unix Home: Unix System Administration
Hints and Tips