![]() |
|
|
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 |
| Insert a line including Variable & Carriage Return / sed command as Variable | lowmaster | Shell Programming and Scripting | 2 | 05-20-2009 12:26 AM |
| Need a sed command that uses variable | ketkeep | Shell Programming and Scripting | 2 | 06-07-2008 02:36 PM |
| Question On Command in Variable | scotbuff | Shell Programming and Scripting | 4 | 10-29-2007 08:23 PM |
| set variable command | ammu | Shell Programming and Scripting | 1 | 05-24-2007 10:45 AM |
| Export command giving Variable Name vs the Value set for the Variable | ParNone | UNIX for Dummies Questions & Answers | 2 | 04-03-2006 12:43 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Using variable in ls command
I am in /home/aaa path and trying to list all the files in different directory - the path to this directory is lengthy. For example: aa/bb/cc/dd/ee/ff/gg/hh/ii/jj... and also the path will change dynamically.
HEnce I capture the directory path in a variable. How to use this variable in ls command. The variable is $dir_name I currently have ls $dir_name out_* | wc -l To list all files starting with "out_" from directory in variable "$dir_name". This is not working. Please advise. Thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|