Solved

Shell Script: Split string

Posted on 2006-06-30
2
6,528 Views
Last Modified: 2009-07-09
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
Comment
Question by:killroy03
2 Comments
 
LVL 4

Accepted Solution

by:
bobgunzel earned 50 total points
ID: 17017865
for i in $STRING
do
echo $i
done
0
 

Author Comment

by:killroy03
ID: 17018173
You see, this is why I LOVE EE!

Thanks a ton Bob!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I delete this file in Linux 2 454
Chinese translation in RedHat 10 47
Understanding curl command 1 50
what is this linux system is? 16 117
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now