Re: bash functions
Subject: bash functions
Date: Fri, May 07, 1999 at 10:27:23PM -0800
In reply to:blutgens@mosquitonet.com
Quoting blutgens@mosquitonet.com(blutgens@mosquitonet.com):
> Reply-To:
> While doing some reading, I came across a section regarding adding functions
> to .bash_profile like this
> tarc () { tar -cvzf $1.tar.gz $1 }
> but whenever I try to source the .bash_profile I get syntax error, unexpected
> EOF messages. The article was old and I assume that bash no loger supports
> this syntax, I messed around with this quite a bit and can't seem to make it
> work. Can anyone offer me advice on this subject? I think these functions
> would be quite handy.
>
It took me awhile to find the answer to this one myself. As I recall
it started when I went to bash 2.xx. Here is what I used to fix them
up
#extract an archive
tarx() { tar xzvf $1; }
#make (create) an archive
tarc() { tar czvf $1.tar.gz $1; }
As you can see it was the ;
--
One good reason why computers can do more work than people is that they
never have to stop and answer the phone.
_______________________________________________________
Wayne T. Topa <wtopa@mindspring.com>
Reply to: