On 01/09/2004 03:02 PM, Todd Slater wrote:

On Thu, Jan 08, 2004 at 06:21:40PM -0500, Rude Boy wrote:


Hi Todd,
I'm glad that you reply my post. Actually, I did something like this:
for x in *.txt
do
zip $x $x.txt // Since it have the same name
done





This would do it for you, I think:

for x in *.txt
do
   zip ${x%*.txt*} $x
done

%*.txt* cuts off everything from the contents of the variable after the text between asterisks, including that text.

Shell programming is such fun...
Paul

--
Windows: Where do you want to go today?
MacOS: Where do you want to be tomorrow?
Linux: Are you coming or what?

http://www.nlpagan.net - Linux Mandrake - Thunderbird 0.5a/20031217
Have you visited http://twiki.mdklinuxfaq.org yet?


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to