sets the variable file to the 1st param supplied.
gets rid of this first param and just leaves the rest of the params in $@
Code:
grep -l "$file" "$@"
grep searches for a string in a file. The -l option just lists the file names it's in. The odd thing is the string to search for is in the variable $file and the file name it is searching is in the variable $@, if this contains more than 1 value (which it might if you typed in say 3 params) it will cause an error.
Code:
vi `grep -l "$file" "$@"`
The backwards single quotes will run the command just mentioned and then pass those file names to vi for you to edit.
It seems a complicated way of not doing anything very interesting. Why were you running it anyway? what were you trying to do?
Mike