10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file.
Ex:
$ cat "sample.log"
I am searching for a word which is present in this file
We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
2. Shell Programming and Scripting
I need to fetch particular string from log file based on grep condition match.
Actual requirement is need to print the next word from the same line based on grep string condtion match.
File :Java.lanag.xyz......File copied completed : abc.txt
Ouput :abc.txt
I have used below... (5 Replies)
Discussion started by: siva83
5 Replies
3. Shell Programming and Scripting
Hello....
Pls help me (and sorry my english) :)
So
I have a file (test.txt) with 1 long line.... for example:
isgc jsfh udgf osff 8462 error iwzr 653 idchisfb isfbisfb sihfjfeb isfhsi gcz eifh
How to print after the "error" word the 2nd 4th 5th and 7th word??
output well be:
653 isfbisfb... (2 Replies)
Discussion started by: marvinandco
2 Replies
4. Shell Programming and Scripting
Dear All,
I have input file like this,
001
059
079
996
758
079
069
059
079
...
...
Desired output:
AA 001
BB 059 (4 Replies)
Discussion started by: attila
4 Replies
5. Shell Programming and Scripting
I have a file that contains the following:
^field LINE_1 data
^field LINE_2 data
^field LINE_3 data
^field LINE_4 data
^field LINE_5 data
...
And im looking to do a line break at the end of the number before the text to make it look like this
^field LINE_1 ... (11 Replies)
Discussion started by: darbs121
11 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have gone through may posts and dint find exact solution for my requirement.
I have file which consists below data and same file have lot of other data.
<MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'>
<MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
Discussion started by: tmalik79
11 Replies
7. Shell Programming and Scripting
Hi,
Our input xml looks like:
<doc>
<str name="account_id">1111</str>
<str name="prd_id">DHEP155EK</str>
</doc>
- <doc>
<str name="account_id">6666</str>
<str name="prd_id">394531662</str>
</doc>
- <doc>
<str name="account_id">6666</str>
<str... (1 Reply)
Discussion started by: Jassz
1 Replies
8. Shell Programming and Scripting
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies
9. Shell Programming and Scripting
I've been trying this, and can't get it right. I want to put a line break before a word, but only if it's *not* the last word in the line. So if the break work was "fish," then...
We want to fish tomorrow
...would become...
We want to
fish tomorrow
...but this line would remain... (3 Replies)
Discussion started by: estebandido
3 Replies
10. Shell Programming and Scripting
Hi,
I have list of directory paths in a variable and i want to delete those dirs and if dir does not exist then search that string and get the correct path from xml file after that delete the correct directory. i tried to use grep and it prints the entire line from the search.once i get the entire... (7 Replies)
Discussion started by: dragon.1431
7 Replies