Notice how this splits on single quote (obfuscatedly written "'"'"'" because of shell quoting mechanisms) and extracts those values which are all numeric. If this is unsuitable, probably an altogether different strategy is required.
Hi,
I need idea about this, say I have this line:
05 21 * * 0,6 /user/clean.desktop.sh > /tmp/desktop_rpt 2>&1
I would need to grep the word desktop and display the /user/clean.desktop.sh and not the whole line. And if I have some more lines say,
05 21 * * 0,6 /user/clean.desktop.sh >... (1 Reply)
Hi,
When we "grep" for a word in a file, it returns the lines containing the word that we searched for. Is there a way to display only the words and not the entire line containing them.
Thanks
Ananth (6 Replies)
Folks, is it possible to display only words with grep (or any built-in ultility)?
I have more than 1 pattern to search, say apple & orange
The text goes like this:
So I need to display all the words starting with apple or orange
The output should be:
Any idea? (7 Replies)
hi, consider the below line in a text file,
'Y',getdate(),'N','V',NULL .....
'N',getdate(),'Y','D',NULL .....
'Y','N','Y',getdate(),'Y','D',NULL ....
as u see above, i want only the second word after the getdate() word...
getdate() will not come 2nd word alwys it may be any position but i... (11 Replies)
Hi guys.
I am trying to perform a search using grep. I get my grep to work, but need to "awk" a Process Number that is 2 lines above...
Example:
I run a query on my TSM server for Processes that are "Waiting" for something...it returns this:
Process Number: 32,881
Process... (14 Replies)
ok, so this is proving to be kind of difficult even though it should not be.
say for instance I want to grep out ONLY the word fkafal from the below output, how do I do it?
echo ajfjf fjfjf iafjga fkafal foeref afoafahfia | grep -w "fkafal"
If i run the above command, i get back all the... (4 Replies)
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
Hi,
Below is an example :
ST1 PREF: int1 AVAIL: int2
ST2 PREF :int1 AVAIL: int2
I need int1 to come in preferred variable while programming and int2 in available variable
Please help me doing so
Best regards,
Vishal (10 Replies)
Hi,
I wanted to grep string "ERROR" and "WORNING" after last occurrence of String "Starting" only and wanted to display two lines after searched ERROR and WORNING string and one line before. I have following cronjob log file "errorlog" file and I have written the code for same in Unix as below... (17 Replies)
Hi,
When we "grep" for a word in a file, it returns the last lines containing the word that we searched for.
Is there a way to display last line to grep.
Thanks
Ex log.
Ex. logname.log
2015-07-29 06:43:07.023|BETA |2015-07-29... (5 Replies)