Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

echo not working with grep  RSS feed

 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have the 2 lines in a simple script. I dont get the echo working

abcd=`grep -n "^GS.*123456.*" /tmp/fileName | cut -d: -f1`
echo $abcd

I get the results when I run the same in the command prompt though not as a script.. Any advise
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Looks like the same question as this one
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!