![]() |
|
|
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 |
| How to maintain the content of array in any directory I go? | luna_soleil | UNIX for Dummies Questions & Answers | 1 | 02-25-2009 11:55 AM |
| sql variable as array index | sudheer157 | UNIX for Advanced & Expert Users | 1 | 02-06-2009 06:26 PM |
| How To Pass an Array Variable | msb65 | UNIX for Dummies Questions & Answers | 9 | 09-04-2008 02:48 PM |
| Array help (variable substitution). | dsimpg1 | Shell Programming and Scripting | 3 | 04-11-2007 05:38 PM |
| Find wildcard .shtml files in wildcard directories and removing them- How's it done? | Neko | UNIX for Dummies Questions & Answers | 1 | 06-27-2001 10:06 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to maintain wildcard array variable
Hi all,
I have this scenario where:- The file that I want to save its name into array df[1] is my.08120323.trx which is located in the dir as below: $ pwd /u01/abc/def/SRC_datafiles $ ls *trx my.08120323.trx $ df[1]=*"trx" ##keeping the filename my.08120323.trx into df[1] $ echo ${df[1]} my.08120323.trx ##getting the correct full output I want df[1] content - my.08120323.trx to be maintained in any directory that I go.. example in below directory.. but I only got *trx value as below when I echo ${df[1]} when I go this directory: $ cd ../.. $ pwd /u01/abc $ echo ${df[1]} *trx ##this is not the output that i expected.. i want it to show my.08120323.trx $ How do I maintain the value of df[1] to be my.08120323.trx instead of only *trx in any directory I go? Please shed some light. Thanks! |
|
||||
|
Quote:
Hey this is working! Thank you so much rikxik! Really really really appreciate this as I've been scratching my head from yesterday abt this issue ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|