|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Solved] Giving files .txt extension
Hi there,
I have around 145,000 files with no file extension in this directory - /home/adams/29: The file name varies but all end with a number from 0 - 9, e.g. TTFILE_BAT_235496, CCNHATA_RFC_23455 I want to give all these 145,000 .txt extension. Please how do I do that? Thanks |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Hi Code:
$ ls a1 a2 a3 Code:
$ for i in *[0-9]
> do
> mv $i ${i}.txt
> doneCode:
$ ls a1.txt a2.txt a3.txt |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks a lot.
You're da dude! |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to list files with no extension together with *.prog files? | adshocker | UNIX for Dummies Questions & Answers | 4 | 11-24-2011 11:57 PM |
| [solved] merging two files and writing to another file- solved | mlpathir | Shell Programming and Scripting | 1 | 10-07-2010 06:41 PM |
| gzip files with extension | nokiak810 | Shell Programming and Scripting | 5 | 07-22-2010 10:15 PM |
| Files without extension | rajahindustani | HP-UX | 1 | 10-09-2008 11:06 AM |
| Removing the extension and FTP the files | pradkumar | Shell Programming and Scripting | 1 | 02-14-2007 01:01 PM |
|
|