var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Problem with 'grep' and 'cut'
When I grep a text file for a pattern, it is printing all the occurences of that pattern to the console separated by some delimiter.
But I want to split all the occurences into separate strings using 'cut', I tried to use the following:
% grep '^steve' textfile | cut -f1 -d'\n'
If I use the above command it says "invalid delimiter". I don't know what delimiter grep inserts after printing out every occurrence of steve.
I want to do this because, if I say:
% grep '^steve' textfile
it is returning all the names such as:
etc.. But I want only steve.
How should I do this?
Any help is very much appreciated.
Thanks a lot in advance,
Thanks for the reply. It worked. But I also tried this:
/usr/xpg4/bin/grep -x 'steve' filename
which also worked for me.