06-13-2007
4,
0
Join Date: Jun 2007
Last Activity: 18 July 2007, 5:38 PM EDT
Posts: 4
Thanks Given: 0
Thanked 0 Times in 0 Posts
Help with a script
I need help following this script:
#!/bin/sh
file=$1
shift
vi `grep -l "$file" "$@"`
when i run it i get nothing. does the 'shift' before the 'vi' command
remove the value of $1, thereby not allowing the script to finish or am
i missing something.
i removed the 'shift' line from the above script and i get an empty vi page.
i thought this script would open the file which matches the 1st argument
in the vi editor??
any help is appreciated.