![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Appending 'string' to file as first column. | satyam_sat | Shell Programming and Scripting | 6 | 02-20-2009 05:15 AM |
| Appending a string to all files in a directory | ragavhere | Shell Programming and Scripting | 1 | 04-28-2008 06:31 AM |
| Sed appending string using for loop? | cstovall | Shell Programming and Scripting | 2 | 01-28-2007 09:30 PM |
| appending string to text file based on search string | malaymaru | Shell Programming and Scripting | 1 | 06-09-2006 08:53 AM |
| Appending to filename a string of text grep finds | HLee1981 | Shell Programming and Scripting | 3 | 09-06-2005 02:44 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Dear Memebers
appending string is not working in loop outside of loop itw working fine, but when i put in loop its not working. please look into this code and suggest me how to do this. supplierCode.txt --------------- UGEN SLAND CEL here is my script ------------------- #!/bin/bash SuppFile=/home/krishnaveni/scripts/supplierCode.txt file1=log filename=$file1".txt" #echo $filename # its working fine exec 0<$SuppFile while read LINE do echo $LINE suppProfileName=$LINE"_sftp.profile" echo $suppProfileName done ---------------------- Here output is UGEN _sftp.profile SLAND _sftp.profile CEL _sftp.profile ----------------- but i want output like UGEN_sftp.profile SLNAD_sftp.profile CEL_sftp.profile Please help me on this. thanks krishna. |
|
||||
|
Quote:
Check it like this: while read LINE do suppProfileName=`echo $LINE"_sftp.profile"` echo $suppProfileName done |
|
||||
|
i dont know why its not working
i tried with commands which you provided me still its giving output _sftp.profile _sftp.profile _sftp.profile i tried with suppProfileName=`echo $LINE"_sftp.profile"` echo $suppProfileName and suppProfileName=`echo ${LINE}"_sftp.profile"` echo $suppProfileName no use what to do now, can i know is there any problem with my script. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|