Search Results

Search: Posts Made By: aj8200
5,791
Posted By aj8200
nawk seems to have done the trick. Anyway nawk...
nawk seems to have done the trick.
Anyway nawk can be used to edit in - place rather than copy to another file?
5,791
Posted By aj8200
Thanks. I tried - awk -v N="export...
Thanks.
I tried - awk -v N="export SYBASE=/opt/sybase15" 'N && /export ENV/ { $0=$0"\n"N ; N="" } 1' < ./tmp.file > ./tmp.fileZ

I get the following error though-
awk: syntax error near line 1...
5,791
Posted By aj8200
Korn Shell script to insert at specific line
Hi,
I am trying to put together a Korn Shell script to insert at a specific line.
The system we use is SunOS 5.10

I can get the line number by using:-
num=`sed -n '/export ENV/=' ./tmp.file`...
Showing results 1 to 3 of 3

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