Search Results

Search: Posts Made By: dc18
26,140
Posted By Scott
while read line do field=`echo $line | cut...
while read line
do
field=`echo $line | cut -d',' -f10`
echo " b4 change ${#field} $field"
field=$(printf "%-18s" "$field")
echo "after change ${#field} $field"
done < file1

...
26,140
Posted By Scott
Hi. Actually, I meant to say field. I...
Hi.

Actually, I meant to say field.

I would normally say field, but somehow said column :) (so, yes!)

I updated my earlier post to remove the confusion.
35,343
Posted By rdcwayx
reserve the spaces before and after DESCRIPTION. ...
reserve the spaces before and after DESCRIPTION.

echo "123456789EXAMPLE DESCRIPTION 1234" |cut -c1-2,10-35

12EXAMPLE DESCRIPTION
35,343
Posted By kurumi
#!/bin/bash while read -r LINE do echo...
#!/bin/bash
while read -r LINE
do
echo "${LINE:0:2}${LINE:9:10}${LINE:20:35}"
done <"file"
35,343
Posted By Aia
Just add quotes to the last echo echo...
Just add quotes to the last echo
echo "$field1$field2$field3" >>outfile
35,343
Posted By vgersh99
nawk '{print substr($0,1,2) substr($0,10,10)...
nawk '{print substr($0,1,2) substr($0,10,10) substr($0, 21,14)}' filea > outfile
Showing results 1 to 6 of 6

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