Search Results

Search: Posts Made By: charlesep
11,232
Posted By charlesep
I need to make the assignment in awk code. I...
I need to make the assignment in awk code.
I found another post where they recommend using
variable = sprintf (x, y)

Thanks anyway for the reply :)
11,232
Posted By charlesep
Thanks, that's what I was looking for, but how do...
Thanks, that's what I was looking for, but how do I put the value into a variable instead of printing it with printf?
63,281
Posted By charlesep
I asked about the bash version because rogerben...
I asked about the bash version because rogerben said he got an error, which doesn't happen to me with the same code
To assign the value to a variable I use the backtick and it works. Taking up your...
63,281
Posted By charlesep
Hi, i tried in bash mode: cat testfile | awk...
Hi, i tried in bash mode:
cat testfile | awk '{print $2 " - " $3}'

Output:
abc - bnmj134
fff - u7Tdff
jij - Qm6Pn*w

What bash version are you using?
11,232
Posted By charlesep
awk division without rounding
Hello to all,
I'm working on a file that contains a series of decimal values with different precision.
I need to divide these numbers by 100 and I don't need to round.

awk '{val = $1 / 100;...
Showing results 1 to 5 of 5

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