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 and shell scripting languages 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 06:55 AM
create array holding characters from sring then echo array. rorey_breaker Shell Programming and Scripting 5 09-28-2007 09:42 AM
string operation fongthai Shell Programming and Scripting 6 11-24-2006 06:26 AM
Problems with sum operation burakkilic UNIX for Dummies Questions & Answers 2 05-15-2006 01:52 PM
multiple operation ajnabi Shell Programming and Scripting 2 09-01-2004 05:56 AM

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

Join Date: Jan 2008
Posts: 36
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.
  #2 (permalink)  
Old 01-18-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,124
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$
  #3 (permalink)  
Old 01-18-2008
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,540
please read the docs next time
  #4 (permalink)  
Old 01-18-2008
phamp008 phamp008 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 36
Thank you all.
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 10:47 AM.


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