Quote:
Originally Posted by
tjay83
So
During the execution of the script, I have to pass blacklist as an argument at the command prompt and find command willnot search the directory in the blacklist. Right?
no. its a variable, with the path to the real blacklist file. created by you.
one file per line. full path.
Quote:
Originally Posted by
tjay83
and here is my questions about your script:
$blacklist=/path/to/file --so why do we use $blacklist and not only blacklist?
as i said. is a variable i create. so next time i use it, i have to tell bash i want the variable and not the literal text.
Quote:
Originally Posted by
tjay83
if [ $line != $file ] -- why not if [ $line != $blacklist ]
$file contains one line, that has been erad from the file. as i explain below
Quote:
Originally Posted by
tjay83
done < $blacklist #black list -- and what is the use of < in here
means that im redirecting the file (wich full path is holded in the variable $blacklist) to the while.
i this case, the "read" command will read one line at a time. and execute the while loop, until it reaschs EOF
this documents is perfect for people starting with bash scripting
Advanced Bash-Scripting Guide
and pls dont sent me pms with questions. specially if you posted the same in here