The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Extract numbers from a string and store in variables
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Extract numbers from a string and store in variables
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
6
(
permalink
)
11-13-2007
prowla
Read Only
Join Date: Nov 2007
Posts: 165
In a script (ksh):
i=1
echo 5.2.314 |
sed
's/\./ /g' | while read n
do
echo "var$i = $n"
let i=i+1
done
prowla
View Public Profile
Find all posts by prowla
Find prowla's past nominations received
Find prowla's present nominations given