Search Results

Search: Posts Made By: ashima jain
8,552
Posted By RudiC
Use "command substitution" likef1(){ echo 1; } ...
Use "command substitution" likef1(){ echo 1; }
STATUS=$(f1)
echo $STATUS
1
3,949
Posted By Don Cragun
Thank you for using CODE tags correctly. :b: ...
Thank you for using CODE tags correctly. :b:

I'm not sure what you mean by "only awk was present". You do realize that if you invoke the script shown in your last post by name (i.e.,...
3,949
Posted By Don Cragun
Look at the tutorial explaining how to use CODE...
Look at the tutorial explaining how to use CODE tags in the private e-mail that was sent to you a few minutes ago...

If this is a shell and/or expect script, why are you telling the system to use...
7,066
Posted By Don Cragun
From the standards: Or, translated from...
From the standards:
Or, translated from standardese, perform the specified substitution (insert an octothorpe at the start of a line) on lines that do not contain an open brace character.
7,066
Posted By Don Cragun
You could also try ed or ex with any shell that...
You could also try ed or ex with any shell that has a syntax based on the Bourne shell (e.g., ash, bash, ksh, zsh...):
#!/bin/ksh
ed -s a.sh <<-EOF
g/beautiful/s/^/#/
w
q
EOF
These...
7,066
Posted By RavinderSingh13
Hello ashima, You are most welcome to forum,...
Hello ashima,

You are most welcome to forum, hope you will enjoy learning here. echo $$ will be used to write PID of the current shell.
So tmp$$ is just a Temporary file created in above code,...
7,066
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

Try awk '/beautiful/ {printf "#"} 1' file > tmp$$; mv tmp$$ file

search these fora for "in place file replacement".
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy