Search Results

Search: Posts Made By: yhkoo
12,785
Posted By yhkoo
It works! Thanks a lot!
awk '{print substr($0,1,7)}' inputfile


My bad. Each column is

awk '{for(i=1;i<=NF; i++) {$i=substr($i,1,7) }
OFS=" "; print $0} ' infile


awk '{for(i=1;i<=NF;i++)...
12,785
Posted By yhkoo
How to print the first 7 characters of each column
Hello all,

I have a data like this:

X:04252 X:05524 X:04176
X:05509 X:05524 X:04674-
X:1662912 X:10181
X:16491 X:05506

X:05216- X:05488

X:46872 X:08471[]
X:04834 X:30170

The except...
Showing results 1 to 2 of 2

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