![]() |
|
|
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 |
| List files that do not match the search pattern | olapxpert | UNIX for Dummies Questions & Answers | 7 | 04-14-2005 04:49 PM |
| List files that do not match the search pattern | olapxpert | IP Networking | 1 | 04-14-2005 03:37 PM |
| korn shell + sftp + list files | alienET | Shell Programming and Scripting | 1 | 03-24-2005 11:12 AM |
| does this variable call work--Korn | morkfard | UNIX for Dummies Questions & Answers | 2 | 07-10-2001 11:59 AM |
| pattern list? | jelizondo1010 | UNIX for Dummies Questions & Answers | 1 | 04-20-2001 09:55 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Korn pattern-list with a variable
I am trying to use a pattern-list match in korn shell using a variable and it always seems to regard the pattern-list as a literal:
Using the directory names explicitly in the pattern-list works fine: ls @(test|test1)/test.txt and returns: test/test.txt Trying to use a variable for this purpose fails: export patternList=test\|test1 ls @(${patternList})/text.txt and returns: @(test|test1)/text.txt: No such file or directory I tried to interpret the way paths are dealt with in the ksh man page, but failed to understand it properly which is probably why I don't understand why this doesn't work. Can someone tell me how to make this work or why it does not work? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|