the below code will search attr string inside makefile under the modelno on given path.
echo "Enter model no for searching string inside makefile"
read inputs2
#find /pools/home_unix/sapte/work/models/model/$inputs2 -name "makefile" | xargs grep "attr" \;
#;;
I am getting below error.
./menu1.sh: line 151: syntax error near unexpected token `"Hit <ENTER> to continue:"'
./menu1.sh: line 151: `echo "Hit <ENTER> to continue:"'
Can someone help me?
thanks in advance.....
We can't possibly say without seeing your code.
try
find /pools/home_unix/sapte/work/models/model/"$inputs2" -name "makefile" -exec grep "attr" {} +
edit: oh right. probably missing syntax before line 151. would need to see much more
joeyg
4
Are you doing this on ___ server, running ___ operating system?
Looks vaguely like a windows/dos script error message.
12)
clear
echo "Enter model no for searching string inside makefile"
read inputs2
find /pools/home_unix/sapte/work/models/model/$inputs2 -name "makefile" | xargs grep "attr" \;
;;
echo "Hit <ENTER> to continue:"
read dummy
;;
The above is one part of my shell scrip which take model no and i want to search string "attr" inside makefile on given path i.e.
/pools/home_unix/sapte/work/models/model/$inputs2
I am getting errror near to echo "Hit <ENTER> to continue:" as below.
./menu1.sh: line 12: syntax error near unexpected token `"Hit <ENTER> to continue:"'
./menu1.sh: line 13: `echo "Hit <ENTER> to continue:"'
hope you are geting what i want to tell you. still let me know if you required any other details..
thanks prashant
What is the \; for? I see no purpose for it there. Remove it.
It's the double ;; under 1 case.
methyl
8