-
Flu
-
RE: Shell Script Help.....
-
Not sure if this is just an error with copying and pasting what you have or not, but you shouldn't need to use the dollar sign before the commands you want inside of the script, so:
[i]$ls /home/brian/*.vob > VOB.lst[/i]
should be:
[i]ls /home/brian/*.vob > VOB.lst[/i]
Also, you may want to hard code the path to your .lst file, just in case you end up running the script from an odd location..that way you can always be sure of where the resultant file is going to end up.
Also, since Linux is case sensitive, you can use the excellent command that mfillpot mentioned, but make the search for the vob files case insensitive, like so: [i]$(ls|grep -i .vob$)[/i]
The [i]-i[/i] on the grep command tells it to ignore case and the [i]$[/i] on the end of the .vob will make sure that it matches only .vob as a file extension and not anywhere else in the file.
-
18 May 09
Not sure if this is just an error with copying and pasting what you have or not, but you shouldn't need to use the dollar sign before the commands you want inside of the script, so:
$ls /home/brian/*.vob > VOB.lst
should be:
ls /home/brian/*.vob > VOB.lst
Also, you may want to hard code the path to your .lst file, just in case you end up running the script from an odd location..that way you can always be sure of where the resultant file is going to end up.
Also, since Linux is case sensitive, you can use the excellent command that mfillpot mentioned, but make the search for the vob files case insensitive, like so: $(ls|grep -i .vob$)
The -i on the grep command tells it to ignore case and the $ on the end of the .vob will make sure that it matches only .vob as a file extension and not anywhere else in the file.