--(Once apon a time, in comp.unix.shell,)--
--(Ravi Parimi said it like only they can.)--
>> --(Once apon a time, in comp.unix.shell,)--
>> --(Ravi Parimi said it like only they can.)--
>> > Hi,
>> > In tcsh, I have an alias which is like this :
>> > alias targz tar cvf - !$ | gzip !$.tar.gz
>> > I cannot implement a similar alias in bash to tar and
>> > gzip a directory in one command. Even a simple alias like
>> > alias tar='tar cvf- $1.tar $1'
>> > doesn't seem to work.
>> > Can anyone help ?
>> > thanks,
>> > --ravi
>> does tcsh allow for functions in your rc file?
>> secondly why arn't you useing the z flag on tar? It will gzip it
>> automaticaly.
>> targz() {
>> tar cfvz $1 $1.tar.gz
>> }
> I think tar cvfz works only with gnu tar. I get the following error when i
> try to run on SunOS 5.8
> $) tar cvfz mail.tar.gz mail/
> tar: z: unknown option
targz() {
tar cfv $1 $1.tar
gzip $_
Quote:}
Woops that is very bashish let me translate that.
targz() {
tar cfv $1 $1.tar
gzip $1.tar
Quote:}
--
It's a damn poor mind that can only think of one way to spell a word.
- Andrew Jackson
UIN=66618055