![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get characters from output of a command in a variable | muaz | Shell Programming and Scripting | 3 | 06-02-2008 10:13 AM |
| [csh] How to capture output from a command and pass it on to a variable? | machinogodzilla | Shell Programming and Scripting | 3 | 05-11-2008 10:36 AM |
| Assigning output of command to a variable | oma04 | Shell Programming and Scripting | 5 | 06-27-2006 01:11 PM |
| redirect command output to variable | hugow | UNIX for Dummies Questions & Answers | 1 | 06-22-2005 07:43 AM |
| Command output to a variable. | videsh77 | Shell Programming and Scripting | 8 | 12-16-2004 06:06 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
ls command output to variable in script
Hi,
I wrote a script to get the oldest file from a directory path (which is passed as a parameter to the script) ######################################################### XMLFILE_PATH={$1} cd $XMLFILE_PATH JPM_FILENAME = `(ls -tr User* | head -1)` #echo $JPM_FILENAME ###### END What is the correct syntax for getting the filename (starting with "User") into JPM_FILENAME from the ls command. Also while calling the script does the path needs to be in quotes? Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|