Search Results

Search: Posts Made By: rajkishore
4,189
Posted By rajkishore
This can do It
grep [ab] [:] textfile.txt | tac | cut -d":" f2 | tee result.txt


Thanks Yogesh and other who viewed/etc my post . :)

:b: Cheers,
Raj
4,189
Posted By rajkishore
May be a regexpression
May be a regexpression can do it easily.

A command like:

grep expression textfile.txt | tee newfile.txt

where expresion will say list me all lines which has 'a:' or 'b:' in it and now ...
4,189
Posted By rajkishore
Expected output
Expected output:

In a text file:

Parent1
child1
child2

parent2
child21
child22
child23

parent3

child31
child32
....

***************************************
4,189
Posted By rajkishore
text manipulation
I am tryin to figure out how to extract interested text from file

example.txt

blah blah
blah a: child1
blah a: child2
blah b: parent1
blah blah
blah ....
blah a: child21
blah a:...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy