Search Results

Search: Posts Made By: larrl
2,485
Posted By larrl
Many thanks, ahamed! I appreciate your sticking...
Many thanks, ahamed! I appreciate your sticking with me to find the real problem. Your patience is apreciated..:b:
2,485
Posted By larrl
That works perfectly. How do I incorporate that...
That works perfectly. How do I incorporate that into a working script?

---------- Post updated at 02:21 AM ---------- Previous update was at 02:14 AM ----------

Here's the output of the script...
2,485
Posted By larrl
The commands are in a file called 't3'. Here's...
The commands are in a file called 't3'. Here's the contents:
#!/bin/sh -xv
AAA=G
sed "/'FUE.SER' 5/,/ 0 0/ {/FUE.SER/{n}; s/F/$AAA/g}"

I invoke it like this:
./t3 <input

I'm running...
2,485
Posted By larrl
when I try your suggestion, I get the result: ...
when I try your suggestion, I get the result:
'FUE.SER' 5
0502 G G
0302 E0502 GG
0504 E0503 E0301 E0201 E0302 E0504 G
0403 G0203 G
0506 E0505 E0303 E0204 E0304 E0506 G
0304 E0508 GG...
2,485
Posted By larrl
Hi ahamed, Yes, like that. But the range is in...
Hi ahamed,
Yes, like that. But the range is in the middle of a file of hundreds of lines. So, I need the range construction.
/FUE\.SER/,/0 0/
And, I don't want to modify the line
'FUE.SER' 5...
2,485
Posted By larrl
sed variable expansion fails for substitution in range
I'm trying to change "F" to "G" in lines after the first one:
'FUE.SER' 5
1 1 F0501 F0401 F0502
2 1 F0301 E0501 F0201 E0502 F0302
3 1 F0503 E0503 E0301 E0201 E0302 E0504...
Showing results 1 to 6 of 6

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