![]() |
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 |
| rename a lot of files again | ajp7701 | Shell Programming and Scripting | 11 | 03-31-2008 07:36 PM |
| rename files help | piltrafa | UNIX for Dummies Questions & Answers | 2 | 10-04-2007 09:47 AM |
| How to Read config (.cfg) files using shell scripting | smallwonder | UNIX for Advanced & Expert Users | 5 | 03-02-2007 12:37 AM |
| rename files | mpang_ | Shell Programming and Scripting | 2 | 11-01-2006 01:17 PM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 08:12 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi all,
i want to rename some files in my directory using korn shell scripting. 1) i want to rename files who have no extension so that they will have the format: filename.extension and 2) i want the files who has extension initially, to stay the same (they will not be changed) do you have any idea about how to do this using ksh scripting? (without using sed or awk) with regards |
|
||||
|
thank you very much
but i still need the ksh solution, because i also want to do some operation on the files other than renaming them. i want to pass the "filenames with no extension" to a ksh variable do some operation (including rename) for example: i have code to process files which have format like: filename.ext for file in *.ext; do #some commands done but i want to modify the code lines above as to process files which have no extension (format like: filename ), while the files which have name format like filename.ext will not be affected |
|
|||||
|
You can use
for file in `find ...` (without -exec) But you'll have problems with files with spaces, see spaces in filenames |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|