The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Storing space delimited line in var with loop?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Storing space delimited line in var with loop?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
08-23-2007
summer_cherry
Registered User
Join Date: Jun 2007
Location: Beijing China
Posts: 557
use awk
hi
see follow example
input(a.txt):
Code:
a b c d e f
code:
Code:
cat a.txt | awk '{ printf("$s,$s,$s",$1,upper($2),$3) }' a.txt
output:
Code:
a B c d E f
summer_cherry
View Public Profile
Find all posts by summer_cherry