Search Results

Search: Posts Made By: aemunathan
7,988
Posted By kato
I think your file must have some control...
I think your file must have some control characters in it that are not visible and also not copied into your example text.
That would explain why the code works when I use it on the examples given....
7,988
Posted By alister
Which shell and operating system are you using? ...
Which shell and operating system are you using? I tested with bash and it worked perfectly on the sample data you provided in a couple of earlier posts. Perhaps your /bin/sh isn't up to the task....
7,988
Posted By ahamed101
Try this awk '/N=/ { ...
Try this


awk '/N=/ {
val=substr($0,3);for(i=0;i<val;i++){
pre="";if(i>0){pre="+"};getline;split($0, arr, "=");str=str pre arr[2];}
getline;split($0, arr, "=");str=str"="arr[2];print...
Showing results 1 to 3 of 3

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