PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

How to do a small change in a lot thousand of files in an easy


Your Ad Here

Your Ad Here

Hi, Horacio.

buttuming they are all in the same directory, dir:

#!-bin-bash

echo echo "Ctrl-c to exit if needed" ehco

dir=-foo-foo # be sure to include the following "-"

# enter the character you want to prepend to the line, or the # number you want to change the initial number to.

echo echo "enter the new initial character or number" echo read newstring

# enter 1 or 2 at the prompt, depending on whether you want to # prepend something like a dash (1), or to change the number (2)

Whatever happened to at, batch, etc
Mark H. Wood" The Debian package. They offer the source too, of course. Package: at Priority: important Section: admin Installed-Size: 200 Architecture: i386 Version: 3.1.8-10 Filename: dists-potato-main-binary-i386...

echo echo " enter 1 to prepend initial character or 2 to change initial number "

read choice

See The Rabid, Psychotic Linux Advocate in It's Own Element!! Linux Sucks
Wibur Post So - keep your business on the machines you already have. I doubt that Linus would mind. I certainly don't. So again - you sound like you're far happier with Apple and-or...

while :

do

case "$choice" in

1 ) for file in ${dir}* do mvtmp-sed$$ "$file" done exit ;;

2 ) for file in ${dir}* do mvtmp-sed$$ "$file" done exit

;;

* ) echo "enter 1 or 2" ; sleep 3 ; continue ;; esac

done

----------

Untested, but it should work with a little tweaking at most. You should have told us what shell you are using.

Be sure to test the above on a bunch of those files moved to another directory first. Or comment out (# ...) the mv lines and take a look at the results in thetmp directory.

AC



Your Ad Here

List | Previous | Next

Whatever happened to at, batch, etc

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

PS2 keyboard