![]() |
|
|
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 |
| How can i unzip .gz extension file? | J_ang | UNIX for Advanced & Expert Users | 9 | 07-11-2009 02:08 PM |
| How to get file extension | shirleyeow | Shell Programming and Scripting | 17 | 01-17-2008 08:40 AM |
| File System extension | xramm | SUN Solaris | 4 | 09-20-2007 09:48 AM |
| Stripping out the extension of a file name | ramky79 | Shell Programming and Scripting | 2 | 12-27-2006 02:25 PM |
| default extension of file | rujupriya | UNIX for Dummies Questions & Answers | 2 | 05-17-2006 11:49 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
remove file extension
Hi ALL,
I'm new to this forum. Thanks and congrats to all for their great efforts building this site simply superb for all unix administrators. My requirement is to remove extensions of the files in the current directory. I'm doing it using below script which is working but i think it is very inefficient as i use lot of variables.I want to get done by avoiding usage of tempfile file and any other temp files being used. #!/usr/bin/bash ls -l |awk '{print $9}' >/list cat /list |while read line do echo $line >/tempfile first=`cut -f1 -d'.' /tempfile` echo $first >>/output.txt mv $line $first done Thanks Praveen RK |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|