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
non-numeric argument TiredOrangeCat UNIX for Dummies Questions & Answers 3 02-12-2007 11:37 PM
passing argument into awk prkfriryce Shell Programming and Scripting 4 02-01-2007 01:44 PM
ls and take each file as argument melanie_pfefer Shell Programming and Scripting 3 01-24-2007 06:10 AM
Stripped argument mikie Shell Programming and Scripting 4 09-28-2006 06:38 AM
argument parsing... midhun_u Shell Programming and Scripting 1 07-25-2006 07:38 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-27-2005
Registered User
 

Join Date: Oct 2005
Location: Michigan
Posts: 7
Question argument help

if i have 2 arguments $1 and $2 how can i append them so that $2 is added to $1? It is really confusing me because it seems so simple, yet i can't get the shell script to work properly. Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 11-27-2005
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,638
Some_new_variable="$1$2"
Reply With Quote
  #3  
Old 11-27-2005
Registered User
 

Join Date: Oct 2005
Location: Michigan
Posts: 7
thanks for the help, but if i wanted to rename it, what would i do?
For example:
arg1=$1
arg2=$2
so if it type the following from the command line:
$ hello again
the file would be called helloagain
it basically appends arg2 to arg1 renaming the file. Thanks.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:55 AM.


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

Content Relevant URLs by vBSEO 3.2.0