The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cat operation trichyselva UNIX for Dummies Questions & Answers 0 03-24-2008 02:55 AM
create array holding characters from sring then echo array. rorey_breaker Shell Programming and Scripting 5 09-28-2007 05:42 AM
string operation fongthai Shell Programming and Scripting 6 11-24-2006 02:26 AM
Problems with sum operation burakkilic UNIX for Dummies Questions & Answers 2 05-15-2006 09:52 AM
multiple operation ajnabi Shell Programming and Scripting 2 09-01-2004 01:56 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-17-2008
Registered User
 

Join Date: Jan 2008
Posts: 25
Array operation

Hi, I would like ask for you help for coding array operation.

array= ( a b c d e f )

I would like to remove entry "d" from my array and import the remaining entries back to the array.

Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-17-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
What language, bash? Just unset it...
Code:
bash-3.00$ array=(a b c d e f)
bash-3.00$ echo ${array[*]}
a b c d e f
bash-3.00$ unset array[3]
bash-3.00$ echo ${array[*]}
a b c e f
bash-3.00$
Reply With Quote
  #3 (permalink)  
Old 01-17-2008
Registered User
 

Join Date: Sep 2006
Posts: 1,448
please read the docs next time
Reply With Quote
  #4 (permalink)  
Old 01-18-2008
Registered User
 

Join Date: Jan 2008
Posts: 25
Thank you all.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0