I would have tried something if I had the knowledge...
What I would like to know is how to perform an action when the pattern is not found. If it is too trivial I apologize... I will try to find a good awk book.
Hi,
I have the following problem: I want to search for a pattern in a file, if it is found the line will be replaced with something else; if it is not found I want to insert a line at the end of file.
Can you please give me some suggestions?
Thanks in advance!
Hi,
I can run the following remsh command from a HPUX server to a SunOS Server:
remsh x.x.x.x PATH_TO_REMOTE_SCRIPT parameters
but if I want to run the remsh from a script like this:
#!/usr/bin/sh
res = `remsh x.x.x.x PATH_TO_REMOTE_SCRIPT parameters`
echo $res
I get the message...
Hi,
I print some text in a file but every print statement writes on a new line and I wish to write on the same line.
For example the code
if (index(FAULTS, 18)) print fca[1] >> "faults.txt"
if (index(FAULTS, 23)) print fca[2] >> "faults.txt"
if (index(FAULTS, 37)) print fca[3] >> "faults.txt"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.