| | |
Appending to a variable
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
Hey there,
For scripting in shell, you can just concatenate the two variables
Hope that helps 
, Mike
For scripting in shell, you can just concatenate the two variables
•
•
•
•
sum="hi "
host # number1="there"
host # echo $sum
hi
host # sum="${sum}$number1"
host # echo $sum
hi there

, Mike
Last edited by eggi; Jan 1st, 2009 at 11:13 pm.
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
Cool. Glad to help out 
. Mike

. Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
![]() |
Similar Threads
- interprater or variable? (Python)
- variable values (PHP)
- elementtree remove and appending (Python)
- VB 6.0 file manipulation prob... (Visual Basic 4 / 5 / 6)
- urgent help required plz help (C)
- variable environment (*nix Software)
- File writing Error (C)
Other Threads in the Shell Scripting Forum
- Previous Thread: Using varibles within awk/sed commands
- Next Thread: Editing files using SED
| Thread Tools | Search this Thread |





