I need to check if the given pattern (by the user) matches an uncommented line in the file....some many lines
...
....
file1();
file2();
I use this
Code: Select all
egrep ^file1\(\) filename
I need to check if the given pattern (by the user) matches an uncommented line in the file....some many lines
...
....
file1();
file2();
Code: Select all
egrep ^file1\(\) filename
Code: Select all
for var in "$@"; do
if [ 'echo $var | egrep "\.java$">/dev/null' -eq 0 ]; then
export javafile=$var
fi
done