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
renaming files jxh461 UNIX for Dummies Questions & Answers 1 02-04-2008 09:32 PM
New iteration of for-loop without incrementing? jeriryan87 Shell Programming and Scripting 0 07-02-2007 03:13 PM
Renaming files cedrichiu Shell Programming and Scripting 3 04-06-2007 05:35 AM
Renaming files whatsup Shell Programming and Scripting 8 07-10-2006 06:47 PM
renaming files raguramtgr UNIX for Dummies Questions & Answers 4 09-21-2004 11:57 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 04-06-2005
Nicol Nicol is offline
Registered User
  
 

Join Date: Sep 2003
Location: Paris
Posts: 128
Question renaming variable between iteration

Hi ,

i'm using the script below , in an iteration "for j in..." (j equal 01 then 02 and so on..), i would rename at each pass the variable nb_bal as nb_bal_$j. (so nb_bal_01 then nb_bal_02 and so on....

I think it's just a quoting problem but at this time i don't find.....

somebody can help ?

thanks in advance
Christian


for j in $liste_mail
do


nb_bal_$j=`rsh $i -l notes01 "find /base/base01/mail/$j -name '*.[nN][sS][fF]' |wc -l" 2> /dev/null`


done
  #2 (permalink)  
Old 04-06-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,124
Try:
temp=`rsh $i -l notes01 "find /base/base01/mail/$j -name '*.[nN][sS][fF]' |wc -l" 2> /dev/null`
eval nb_bal_$j=\$temp
  #3 (permalink)  
Old 04-06-2005
Nicol Nicol is offline
Registered User
  
 

Join Date: Sep 2003
Location: Paris
Posts: 128
Thank you very much , this is the right thing i want !

Christian
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 05:38 PM.


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