Search Results

Search: Posts Made By: mikepegg
1,477
Posted By mikepegg
Thanks for the responses guys. My mistake trying...
Thanks for the responses guys. My mistake trying to cut down the input file to be forum workable and missing out on that.

ghostdog74's code

awk 'NR==1022 && /String\042/ {...
1,477
Posted By mikepegg
simple selection between two words
Hi guys, got an issue with a relatively simple bit of awk but stumping me. Want this to run on several different lines. The first is:

INPUT="<Cell ss:StyleID="s70"><Data...
6,269
Posted By mikepegg
perfect, thanks very much tkleczek :b:
perfect, thanks very much tkleczek :b:
6,269
Posted By mikepegg
oh looking back that's my mistake. need, ...
oh looking back that's my mistake.

need,

output: text1#text2#text3(var1 var2 var3)#text4(var4 var5 var6)
6,269
Posted By mikepegg
No error now but only doing the first occurance. ...
No error now but only doing the first occurance.

N="text1#text2#text3(var1#var2#var3)#text4(var4#var5#var6)"
N=`echo $N |
sed -e '
:a
s/^\([^(]*([^)#]*\)#\([^)]*).*\)/\1 \2/
ta
'`

echo...
6,269
Posted By mikepegg
Thanks for the effort, can't seem to get it to...
Thanks for the effort, can't seem to get it to work though. gives me an error.

N="text1#text2#text3(var1#var2#var3)#text4(var4#var5#var6)"
N=`echo $N | sed ':a ;...
6,269
Posted By mikepegg
sorry to bump but looking for help with a...
sorry to bump but looking for help with a slightly different input.

Tried changing parts around but a bit stumped.

N="text1#text2#text3(var1#var2#var3)" has changed to...
6,269
Posted By mikepegg
Thanks for that ghostdog74, all working now. ...
Thanks for that ghostdog74, all working now.

N="text1#text2#text3(var1#var2#var3)"

awk -v stringvar=$N 'BEGIN{
string = stringvar
start = index(string,"(")
end = index(string,")")
...
6,269
Posted By mikepegg
Hi guys, had a few days off :o awk...
Hi guys, had a few days off :o


awk 'BEGIN{
string = "text1#text2#text3(var1#var2#var3)"
start = index(string,"(")
end = index(string,")")
tochange=substr(string,start,end-start+1)
...
6,269
Posted By mikepegg
sed pattern range
Hi guys, trying to replace a '#' with a ' ' (space) but only between the brackets '(' and ')'

N="text1#text2#text3(var1#var2#var3)"

N=`echo $N |sed '/(/,/) s/#. //'`

echo $N

Looking for...
2,480
Posted By mikepegg
Thanks. worked it into a fix :)
Thanks. worked it into a fix :)
2,480
Posted By mikepegg
sed issues
Hi guys, not that used to using sed beyond the simple substitution. I am trying to check for a program (program1) and if it exists replace the standard output "program1" with a "program1(part1 part2)...
30,647
Posted By mikepegg
thanks, works perfectly and exactley what I was...
thanks, works perfectly and exactley what I was looking for. :b:
Showing results 1 to 13 of 13

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