• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6550
  • Last Modified:

Shell Script: Split string

Greetings,

I have a long string like so:

STRING="233445 4504505 2828287 373349 2348445 560950 238920"

I would like to split this string up into an array of some sort then loop through the array and echo each value.

Thank you very much.
0
killroy03
Asked:
killroy03
1 Solution
 
bobgunzelCommented:
for i in $STRING
do
echo $i
done
0
 
killroy03Author Commented:
You see, this is why I LOVE EE!

Thanks a ton Bob!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now