Search Results

Search: Posts Made By: andyatit
1,368
Posted By MadeInGermany
Unix sed needs sed...
Unix sed needs
sed 's#\.\.\(/\.\.\)\{0,1\}#%HOME%#' file
1,368
Posted By rangarasan
Well, try sed -r 's#\.\.(/\.\.)*#%HOME%#'...
Well, try


sed -r 's#\.\.(/\.\.)*#%HOME%#' file


-Ranga
2,019
Posted By DGPickett
You use the N to append the next line and loop...
You use the N to append the next line and loop back if COMPANY is not there:sed '
:lopp
/COMPANY/!{
N
b loop
}
.
.
.
'
The resulting buffer matches...
3,782
Posted By MadeInGermany
Yoda, your answer is not correct; it'll match...
Yoda, your answer is not correct; it'll match !/^Date/ in the entire file!
It is necessary to have a kind of state; awk and a state variable is appropriate.
awk '/^Date/ {s=0}...
4,628
Posted By MadeInGermany
Try this sed -e '/\['$section'\]/ { ...
Try this

sed -e '/\['$section'\]/ {
:skip
n
/^$/!b skip
i\
'"$line"'
}' wav.test
4,628
Posted By bakunin
That is OK, "SunOS 5.10" already puts it in...
That is OK, "SunOS 5.10" already puts it in perspective. Note that with SunOS you need to use the tools in "/usr/xpg4/bin/" rather than in "/usr/bin". What is your "PATH" variable looking like?

...
Showing results 1 to 6 of 6

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