![]() |
|
|
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 |
| Renaming file names in a shell script | rudoraj | Shell Programming and Scripting | 1 | 01-26-2009 08:05 PM |
| Dealing with spaces in file names in a shell script | same1290 | Shell Programming and Scripting | 5 | 08-13-2008 12:01 AM |
| How do manipulate file path and names | siegfried | Shell Programming and Scripting | 2 | 09-28-2007 12:20 PM |
| Reading file names from a file and executing the relative file from shell script | anushilrai | Shell Programming and Scripting | 4 | 03-10-2006 05:25 AM |
| How can I delete files using a file that containt path and names? | AlvaroD | UNIX for Dummies Questions & Answers | 2 | 09-25-2001 01:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
want only file names (not whole path) in shell script
hi i wrote following script,
#!/usr/bin/sh for index in `ls /tmp/common/*.txt` do echo "$index" done here index is giving full path but in my program i want only file names (not along with whole path) Eg. if in /tmp/common files are a.txt and b.txt den out should be a.txt b.txt and not like ==> /tmp/common/a.txt /tmp/common/b.txt any knows how to do it? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|