Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append new record with existing Array 1

Status
Not open for further replies.

vuakhobo

Technical User
Apr 22, 2004
41
US
Is there a way to append new record at the end of the existing array?
 
Any chance you could post your actual code and explain us what do you want to do ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
set -A ArrayID 'A''B''C'

#Call CalculateTime function
for h in "${ArrayID[@]}"
do
echo $h
done


Say if I have new record D need to add to ArrayID how can I append it to ArrayID
 
ArrayID[${#ArrayID[*]}]='D'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV,
thank you PHV .. it works like a charm.
 
PHV,

I have this array, ArrayID 'A''B''C'
Is there anyway that I can create 3 arrays from the ArrayID's list?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top