10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a eg file op.txt
This is a cat
This is a fat cat
This is a fat black cat
I want to remove only the word cat from the first alone .can somebody help.
please do wrap your samples in CODE TAGS
As per forum rules. (7 Replies)
Discussion started by: Sharks
7 Replies
2. Shell Programming and Scripting
United States 1.2.3.4 80 10 1563790914 1 1932454179 1.2.3.6 55517 11.1.2.1 55517
Italy 1.2.3.4 80 10 1563790914 1 1932454179 1.2.3.6 55517 11.1.2.1 55517
India 1.2.3.4 80 10 1563790914 1 1932454179 1.2.3.6 55517 11.1.2.1 55517
south Africa 1.2.3.4 80 10 1563790914 1... (9 Replies)
Discussion started by: arm
9 Replies
3. UNIX for Advanced & Expert Users
Hi Folks :)
I have a .txt file with thousands of words. I'm trying to sort the lines in order based on number of words per line.
Example
from:
word
word word word
word word
word word word word
word
word word word
word word
to desired output:
word (2 Replies)
Discussion started by: martinsmith
2 Replies
4. Shell Programming and Scripting
Hi
I use sed comnand to remove occurance of one workd from a line.
However I need to removed occurance of dufferent words in ne line.
Original-1 Hi this is the END of my begining
Comand sed s/"END"/"start"/g
Output-1 Hi this is the start of my beginig
But I have more... (9 Replies)
Discussion started by: mnassiri
9 Replies
5. Shell Programming and Scripting
Hi I would like to remove last few words from File
Could anybody Help on it.
ps -ef | grep mgr.prm | awk '{print $10}'
/opt/app/dummyd/xyz/dirprm/mgr.prm
/opt/app/dummy/xyz/dirprm/mgr.prm
/opt/app/dummy/xyz/dirprm/mgr.prm
I want output like
/opt/app/dummyd/xyz... (4 Replies)
Discussion started by: tapia
4 Replies
6. UNIX for Advanced & Expert Users
I would like to cut words based on the word count of a line. This over here inspired me with some ideas but I wasn't able to get what I needed.
https://www.unix.com/shell-programming-scripting/105841-count-words-each-line-file-using-xargs.html
If the line has 6 words I would like to use this.... (8 Replies)
Discussion started by: cokedude
8 Replies
7. Shell Programming and Scripting
My file looks like:
asd absjdd
sdff vczxs
wedssx c
dasx ccc
I need to keep
asd
sdff
wedssx
dasx
How do I do that experts?:wall::wall: (1 Reply)
Discussion started by: hakermania
1 Replies
8. Shell Programming and Scripting
Hi Guys,
I have a file like this:
wwwe 1 ioie ewew yyy uuu 88
erehrlk 4 ihoiwhe lkjhassad lkhsad yyy mmm 45
jhash lhasdhs lkhsdkjsn ouiyrshroi oihoihswodnw oiyhewe yyy ggg 77
I want to remove everything after "yyy" and including "yyy" from each line in the file.
So I want:... (2 Replies)
Discussion started by: npatwardhan
2 Replies
9. Shell Programming and Scripting
Hi,
Please help!
I have a file having duplicate words in some line and I want to remove the duplicate words.
The order of the words in the output file doesn't matter.
INPUT_FILE
pink_kite red_pen ball pink_kite ball
yellow_flower white no white no
cloud nine_pen pink cloud pink nine_pen... (6 Replies)
Discussion started by: sam_2921
6 Replies
10. Shell Programming and Scripting
Hi All,
Sample:
4051 Oct 4 10:03:36 AM 2008: TEST: end of testcase Checking Interface after reload, result fail
I need to remove first 10 words of the above line and output should be like
Checking Interface after reload, result fail
Please help me in this regard.
Thanks, (4 Replies)
Discussion started by: shellscripter
4 Replies