Hi,
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:
steve
steven
stevenson
stevens
etc.. But I want only steve.
How should I do this?
Any help is very much appreciated.
Thanks a lot in advance,
sbk