Search Results

Search: Posts Made By: jamilzain
1,849
Posted By jamilzain
thx all... awk is working .. awk...
thx all...
awk is working ..

awk '$0=="cron"{$0=sprintf("%s\n%s",$0,"nfsd");}1' filename


awk '$0=="cron"{$0=sprintf("%s\n%s",$0,"nfsd");}1' filename>filename1


love U all | warpiece
1,849
Posted By jamilzain
sed to add text in new line
help

i need to add a "nfsd" in new line after cron

ex:
cron
rpcbind

output:
cron
nfsd
rpcbind

i use
sed -e "/cron/G; s/$/nfsd/" myfile

output:
cron
nfsd
rpcbindnfsd
Showing results 1 to 2 of 2

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