10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies
2. UNIX for Dummies Questions & Answers
If I have an output from egrep that has two elements on separate lines can I concatenate them? so the egrep for examople might be:
egrep "filename|type"
And the actual output might be:
./file001.doc
Type Text Document
How do I get the egrep to remove the line feed so the output is:
... (5 Replies)
Discussion started by: TuftyDave
5 Replies
3. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
4. Shell Programming and Scripting
Hi,
Im using the below command to search a file for multiple expressions if the 4th expression doesnt exist the command simply lists what it can find and ignores what it cant. Is there any way to get the command to output an error or a message if it cant find the 4th expression to a file?
... (16 Replies)
Discussion started by: 02JayJay02
16 Replies
5. Shell Programming and Scripting
The order of egrep output seems to be as they occur in the file. How do I get the order as requested? For e.g.
file contents:
AAA
EEE
GGG
egrep 'GGG|AAA|EEE' file
gives
AAA
EEE
GGG
instead of
GGG
AAA
EEE (2 Replies)
Discussion started by: madhavb
2 Replies
6. UNIX for Dummies Questions & Answers
HI Guys,
I want egrep from ./txt file which begging from Hello.
File A.txt
Hello A
Abc
Abc
Xyz
Hello B
Hello C
..
...
Output File B
Hello A
Hello B (2 Replies)
Discussion started by: asavaliya
2 Replies
7. Shell Programming and Scripting
Dear Friends,
I have a command which can result following output.
Packet is: /var/adm/yyyy/pkt6043
Intended for network : /vob/repo
I would like to retrive
pkt6043 and /vob/repo using single command.
Blue color test will be always contstant and red color text will be dynamic
... (2 Replies)
Discussion started by: baluchen
2 Replies
8. Shell Programming and Scripting
Hi !!! Dear People,
Please help me with the following problem.
consider this output:
Top 5 Timed Events
~~~~~~~~~~~~ Total
Event Waits Time (s) Ela Time
---------------------------- ------------ ----------- -----
CPU time ... (3 Replies)
Discussion started by: user__user3110
3 Replies
9. Shell Programming and Scripting
Hi all,
I have an input file that I am pulling out certain phases using the following commands:
cat /nodes.txt | egrep -e 'OSVersion|PrimaryNodeName'
Currently the output looks like this:
OSVersion - 5.0
PrimaryNodeName - serverA
OSVersion - 5.0
PrimaryNodeName - serverB
OSVersion... (2 Replies)
Discussion started by: indianadoug
2 Replies
10. UNIX for Dummies Questions & Answers
I followed the egrep example given in the thread "parse text or complex grep ?". It is exactly what I need...except... how do I insert a blank line after the second line? My exact command is:
egrep 'patt1|patt2' filename
the result is:
patt1
patt2
patt1
patt2
and so on. I would... (2 Replies)
Discussion started by: antalexi
2 Replies