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
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
3. Shell Programming and Scripting
Hi,
I am trying to search for a word and print the next word. For example:
My text is "<TRANSFORMATION TYPE ="Lookup Procedure">"
I am searching for "TYPE" and trying to print ="Lookup Procedure"
I have written a code like following:
echo $line | nawk... (4 Replies)
Discussion started by: sampoorna
4 Replies
4. 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
5. Shell Programming and Scripting
Hi
I have requirement to search string starting with specific characters and print whole matching word in that string.
example
mystr="ATTRIBUTE NAME="Event Name" VALUE="Execute""
I want to search by passing "NAME=" and result should be NAME="Event Name".
i am using below command but... (3 Replies)
Discussion started by: tmalik79
3 Replies
6. Shell Programming and Scripting
Hi Gurus
I am new to this forum.. I am using HP Unix OS.
I have one single string in input file as shown below
Abc123 | cde | fgh | ghik| lmno | Abc456 |one |two |three | four | Abc789 | five | Six | seven | eight | Abc098 | ........
I want to achive the result in a output file as shown... (3 Replies)
Discussion started by: kannansr621
3 Replies
7. UNIX for Dummies Questions & Answers
Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name".
Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 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
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
10. Shell Programming and Scripting
Hi Folks,
I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas?
... (4 Replies)
Discussion started by: HealthyGuy
4 Replies