Search Results

Search: Posts Made By: Mohammed Rafi
3,287
Posted By Mohammed Rafi
Many thanks, This is working perfectly fine. ...
Many thanks, This is working perfectly fine.

nawk -v para="$param" 'BEGIN {FS="\037";OFS="\037"; n=split (para, P, "$")} {for(i=2; i<=n;i++) printf("%s%s", $P[i], (i==n)?ORS:OFS)}' 1.dat
...
3,287
Posted By Mohammed Rafi
I believe, for making it more generic, I need to...
I believe, for making it more generic, I need to use the solution by vgersh99 with the for loop, which is with the below commandnawk -v para="$param" 'BEGIN {FS="\037";OFS="\037"; n=split (para, P,...
3,287
Posted By Mohammed Rafi
Hi RudiC, Both the approach are working...
Hi RudiC,

Both the approach are working fine, But the OFS is not outputting in the file, not sure why its omitting the OFS.

Thanks
3,287
Posted By Mohammed Rafi
Oh!! Actually, I was planning to write a generic...
Oh!! Actually, I was planning to write a generic function which may work for any number of fields to be seperated. So, Is it not possible?
3,287
Posted By Mohammed Rafi
awk With multiple print variables
Hi,

I have a parameter which will be having the fields which needs to be filtered or derived. But This is not working which is mentioned below. I am using the below mentioned OS

uname -a
SunOS...
1,295
Posted By Mohammed Rafi
Many thanks, Its working with while. Its not...
Many thanks, Its working with while.

Its not a script. It was a txt file in which the variable names are there which is environment variables. Tried to get the values; but could not with echo....
1,295
Posted By Mohammed Rafi
Resolving the environment variable from a file
Hi,

I an having some environment variables exported and the variable name is present in the file. But its not resolving with following commands. Can someone throw some light.
db $ grep -v "^#"...
Showing results 1 to 7 of 7

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