![]() |
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 |
| 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 |
| Auto copy for files from folder to folder upon instant writing | Bashar | UNIX for Advanced & Expert Users | 2 | 08-21-2008 02:44 PM |
| Parse the .txt file for folder name and FTP to the corrsponding folder. | MeganP | Shell Programming and Scripting | 3 | 07-03-2007 01:54 PM |
| file name in folder | u263066 | Shell Programming and Scripting | 5 | 10-12-2006 08:37 AM |
| pickup file from folder | ram2s2001 | Shell Programming and Scripting | 0 | 03-07-2006 02:02 AM |
| Deleting the file in a folder | srivsn | Shell Programming and Scripting | 2 | 12-14-2005 09:05 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
getting a file name from a folder
what is command for getting a list of file in the particular folder.
Assume X is folder where y is subfolder inside X and there is one file called abc.text. While giving this command it would return two value ie abc.txt and y. Code:
$cd X $ls -lrt *.txt |cut -c55-120 Can anyone please advice what is best to capture only abc.txt. also how this can be set into a varibale v_file in unix script. is this correct Code:
v_file=`echo ls -lrt *.txt |cut -c55-120' |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|