The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
parsing a string
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
parsing a string
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
05-16-2008
era
Herder of Useless Cats
Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
This is not particularly newbie-friendly, but a common shell scripting idiom.
Code:
oldifs=IFS IFS=, set -- $variable hs1=$1 hs2=$2 hs3=$3 hs4=$4 IFS=$oldifs
era
View Public Profile
Visit era's homepage!
Find all posts by era