Re: apt-get offline
On Wed, May 16, 2001 at 10:34:20AM +0200, Joerg Johannes wrote:
>
> Sorry, I did not express myself clear enough. This sed thing changes
> every line in the "wget-script" script. This, I did easily with emacs
> (while sed is much more elegant). My problem is: I do not want to do
> hundreds of
> mv package1_1xxxxx3a.deb package1_1%3a.deb
> mv package2_1xxxxx3a.deb package2_1%3a.deb and so on
>
something along the lines of :-
#!/bin/bash
cd dir/with/files
IFS=$'\n'
for oldname in `ls -1 *xxxxx*'
do
newname=`echo $oldname | sed s/xxxxx/%/`
mv $oldname $newname
end
mebbe? (untested)
Reply to: