Search Results

Search: Posts Made By: smacleod
22,317
Posted By smacleod
awk substr and variable for next n characters?
Here is my code

let x=10 #or any other calculated value done here
`echo $sol | awk '{print substr($0,1,(x-3))}'`


Question.
I am able to use the variable x in beginning at...
7,829
Posted By smacleod
awk and getting # of characters in a line
Is there a way I can use the awk length command to get total # of characters in a record (line)


Thank you
Showing results 1 to 2 of 2

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