The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Access value outside awk or split value of array jason.bean UNIX for Dummies Questions & Answers 1 11-26-2007 04:33 PM
[KSH] Split string into array piooooter Shell Programming and Scripting 3 09-01-2007 12:22 PM
How to get array to not split at spaces? jjinno Shell Programming and Scripting 1 07-20-2007 12:06 AM
split to array in perl jaganadh Shell Programming and Scripting 3 07-06-2007 05:29 AM
Assigning values to an array yongho UNIX for Dummies Questions & Answers 4 07-13-2005 08:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-21-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
split variable values into array

i have these values inside variable $blah

Code:
BUNGA TERATAI 3    5055     ITH      1     0     0     0     1     1
JADE TRADER    143W     ITH      4     0     0     0     4     4
MOL SPLENDOR   0307A     ITH      3     0     0     0     3     3
so how do I split them into array with the new line as the delimiter?
  #2 (permalink)  
Old 05-21-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
In which shell / programming language?
  #3 (permalink)  
Old 05-21-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
usr/bin/sh..I think it's bourne shell
  #4 (permalink)  
Old 05-21-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Basic Bourne shell does not have an array variable type.
  #5 (permalink)  
Old 05-21-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
sorry, checked wrongly, it's korn shell

Last edited by finalight; 05-21-2008 at 03:30 AM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0