10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file "test" with following contents:
I want to only grep for abc or abc_ without getting other results, how do I achieve this?
If I use grep -w abc test option I get only abc and not abc_.
If I use egrep "abc|abc_" test its still printing... (3 Replies)
Discussion started by: ctrld
2. Shell Programming and Scripting
Could you please advise what will be the SED command to replace a word in all xml's under a particular directory
for example let say I rite now at the following below location
$ cd /ter/rap/config
now under config directory there will be lots of xml file , now my objective is to... (1 Reply)
Discussion started by: punpun66
3. Shell Programming and Scripting
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
Vishal (10 Replies)
Discussion started by: Vishal_dba
4. Shell Programming and Scripting
can we grep for a word and print the next word of the greped word?
ex:- create or replace function function_name
create function function_name
we should search for word "function" and output next word "function_name" from both lines. (3 Replies)
Discussion started by: manasa_vs
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
family balance >>>>>
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at... (2 Replies)
Discussion started by: linuxadmin
7. Shell Programming and Scripting
I have input file as below. Can you help me?
Please use and tags when posting code, data or logs etc. to preserve formatting... (5 Replies)
Discussion started by: suresh3566
8. Shell Programming and Scripting
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)
Discussion started by: SkySmart
9. UNIX for Dummies Questions & Answers
hi, consider the below line in a text file,
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)
Discussion started by: prsam
10. UNIX for Dummies Questions & Answers
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.
Ananth (6 Replies)
Discussion started by: ananthmm
ZGREP(1) BSD General Commands Manual ZGREP(1)
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files
zgrep [grep-flags] [--] pattern [files ...]
zegrep [grep-flags] [--] pattern [file ...]
zfgrep [grep-flags] [--] pattern [file ...]
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1).
The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern
zegrep calls egrep(1), while zfgrep calls fgrep(1).
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0.
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1)
Thomas Klausner <wiz@NetBSD.org>
December 28, 2003 BSD