Re: Excluding a list of files from tar with spaces in filenames

2010-02-05 Thread Amos Shapira
On 6 February 2010 00:24, Dotan Cohen wrote: >> OK, fair enough, but why do you need the 'dd' at the end?: >> > > Because I know nothing about shell scripting and I am learning by > google, trial and error. No worries. I still sometimes get a kick from showing off my shell/scripting/programming p

Re: Excluding a list of files from tar with spaces in filenames

2010-02-05 Thread Dotan Cohen
> OK, fair enough, but why do you need the 'dd' at the end?: > Because I know nothing about shell scripting and I am learning by google, trial and error. > tar -zcvf - --exclude-from $EXCLUDES * 2>STDERR | openssl des3 -salt > -k $1 > $(hostname)-$(date +%Y%m%d).tbz > > should output tar's stder

Re: Excluding a list of files from tar with spaces in filenames

2010-02-05 Thread Shlomi Fish
up. > > Some of these directories have spaces in their filenames. The > > following script works so long as there are no directories with spaces > > in DONT_COPY, however, I cannot figure out what to do to get it to > > work _with_ spaces in filenames: > > > > #

Re: Excluding a list of files from tar with spaces in filenames

2010-02-05 Thread Meir Kriheli
directories have spaces in their filenames. The following script works so long as there are no directories with spaces in DONT_COPY, however, I cannot figure out what to do to get it to work _with_ spaces in filenames: #!/bin/bash DONT_COPY=" .adobe/ File with Spaces .bin/google-earth Yet Another Ann

Re: Excluding a list of files from tar with spaces in filenames

2010-02-05 Thread Amos Shapira
On 5 February 2010 18:51, Dotan Cohen wrote: >> Do >> >> tar -zcvf - *  --exclude-from $EXCLUDES > out.tar 2> tar.err >> >> to redirect stderr into a file. >> >> I just noticed that the way you specify the output tar file is not >> conventional. You tell it to use stdout then redirect it to a file

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Dotan Cohen
> Do > > tar -zcvf - *  --exclude-from $EXCLUDES > out.tar 2> tar.err > > to redirect stderr into a file. > > I just noticed that the way you specify the output tar file is not > conventional. You tell it to use stdout then redirect it to a file > using the shell, instead you can tell tar to open t

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Amos Shapira
On 5 February 2010 08:11, Dotan Cohen wrote: > Thanks, Meir, I just got this to work: > > EXCLUDES=`tempfile` > cat >$EXCLUDES < $DONT_COPY > EOLIST > > tar -zcvf - *  --exclude-from $EXCLUDES > out.tar > > rm -f $EXCLUDES > > > > By the way, because of the "v" flag, tar outputs all the directorie

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Dotan Cohen
e spaces in their filenames. The >> following script works so long as there are no directories with spaces >> in DONT_COPY, however, I cannot figure out what to do to get it to >> work _with_ spaces in filenames: >> >> #!/bin/bash >> >> DONT_COPY=" &

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Meir Kriheli
directories with spaces in DONT_COPY, however, I cannot figure out what to do to get it to work _with_ spaces in filenames: #!/bin/bash DONT_COPY=" .adobe/ File with Spaces .bin/google-earth Yet Another Annoying Filename " DONT_COPY_LIST="" for pattern in $DONT_COPY ; do DONT_COPY_L

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Dotan Cohen
have spaces in their filenames. The >> following script works so long as there are no directories with spaces >> in DONT_COPY, however, I cannot figure out what to do to get it to >> work _with_ spaces in filenames: >> >> #!/bin/bash >> >> DONT_COPY="

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Dotan Cohen
; Some of these directories have spaces in their filenames. The >> following script works so long as there are no directories with spaces >> in DONT_COPY, however, I cannot figure out what to do to get it to >> work _with_ spaces in filenames: >> >> #!/bin/bash >&g

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Baruch Siach
owing script works so long as there are no directories with spaces > in DONT_COPY, however, I cannot figure out what to do to get it to > work _with_ spaces in filenames: > > #!/bin/bash > > DONT_COPY=" > .adobe/ > File with Spaces > .bin/google-earth > Yet An

Re: Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Shlomi Fish
s so long as there are no directories with spaces > in DONT_COPY, however, I cannot figure out what to do to get it to > work _with_ spaces in filenames: > > #!/bin/bash > > DONT_COPY=" > .adobe/ > File with Spaces > .bin/google-earth > Yet Another Annoying Filename

Excluding a list of files from tar with spaces in filenames

2010-02-04 Thread Dotan Cohen
cannot figure out what to do to get it to work _with_ spaces in filenames: #!/bin/bash DONT_COPY=" .adobe/ File with Spaces .bin/google-earth Yet Another Annoying Filename " DONT_COPY_LIST="" for pattern in $DONT_COPY ; do DONT_COPY_LIST="$DONT_COPY_LIST --exclude=$

Re: spaces in filenames

2000-12-27 Thread Oleg Goldshmidt
Adi Stav <[EMAIL PROTECTED]> writes: > On Wed, Dec 27, 2000 at 12:55:19AM +0200, Nadav Har'El wrote: > > On Tue, Dec 26, 2000, Adi Stav wrote about "Re: spaces in filenames": > > > Speaking of, by the way, I wonder why almost everybody I've seen w

Re: spaces in filenames

2000-12-27 Thread Oleg Goldshmidt
guy keren <[EMAIL PROTECTED]> writes: > while the 'cd' override solution does not work on certain cases. i often > use the 'pushd' and 'popd' command, which also change the current > directory, and do NOT invoke the shell builtin 'cd' function, at least not > under tcsh. so you need to alias 'cd'

Re: spaces in filenames

2000-12-27 Thread Nadav Har'El
On Wed, Dec 27, 2000, Adi Stav wrote about "Re: spaces in filenames": > Ah, no. We are talking about five bytes here (plus the length of the > title). And since it will arrive through telnet (or equivalent) > together with the rest of the prompt, in normal use it will occupy a

Re: spaces in filenames

2000-12-27 Thread Nadav Har'El
On Wed, Dec 27, 2000, guy keren wrote about "Re: spaces in filenames": > while the 'cd' override solution does not work on certain cases. i often > use the 'pushd' and 'popd' command, which also change the current > directory, and do NOT inv

Re: spaces in filenames

2000-12-26 Thread Adi Stav
On Wed, Dec 27, 2000 at 12:55:19AM +0200, Nadav Har'El wrote: > On Tue, Dec 26, 2000, Adi Stav wrote about "Re: spaces in filenames": > > Speaking of, by the way, I wonder why almost everybody I've seen who > > digs smart xterm titles uses the

Re: spaces in filenames

2000-12-26 Thread guy keren
On Wed, 27 Dec 2000, Nadav Har'El wrote: > On Tue, Dec 26, 2000, Adi Stav wrote about "Re: spaces in filenames": > > PS1_SIMPLE="\h: \w " > > PS1="\[\033]0;${PS1_SIMPLE}\007\]${PS1_SIMPLE}" > > Maybe because your solution (at first glanc

Re: spaces in filenames

2000-12-26 Thread Nadav Har'El
On Tue, Dec 26, 2000, Adi Stav wrote about "Re: spaces in filenames": > Speaking of, by the way, I wonder why almost everybody I've seen who > digs smart xterm titles uses the cd trick instead of something like: > > PS1_SIMPLE="\h: \w " > PS1="\[\0

Re: spaces in filenames

2000-12-26 Thread Adi Stav
On Tue, Dec 26, 2000 at 08:15:39PM +0200, Oleg Goldshmidt wrote: > Brilliant! Stupid me! I had > > # let the xterm titlebar show the current dir > xtitle() { > if [ "$TERM" = "xterm" ]; then > echo -n -e "\033]0;$@\007" >/dev/tty > fi > } > > # Change the 'cd' 'pu

Re: spaces in filenames

2000-12-26 Thread Oleg Goldshmidt
"Nadav Har'El" <[EMAIL PROTECTED]> writes: > Do you have a 'cd' function in your .bashrc? ;) > > It appears that in your own account (but not root), you have a cd function > (e.g., that shows the current directory on a window's title), which perhaps > uses $* and distroys the shell's space handl

Re: spaces in filenames

2000-12-26 Thread Nadav Har'El
On Tue, Dec 26, 2000, Oleg Goldshmidt wrote about "spaces in filenames": > > Hi, I see the following weird phenomenon: bash cannot recognize > filenames or directories that have spaces, unless I am root/su. This > is a typical example: > > $ mkdir "Foo Bar"

Re: spaces in filenames

2000-12-26 Thread Moshe Zadka
On 26 Dec 2000, Oleg Goldshmidt <[EMAIL PROTECTED]> wrote: > $ mkdir "Foo Bar" > $ cd Foo\ Bar/ > bash: cd: Foo: No such file or directory It Works For Me(tm) on RH 6.2 = To unsubscribe, send mail to [EMAIL PROTECTED] with the word

spaces in filenames

2000-12-26 Thread Oleg Goldshmidt
Hi, I see the following weird phenomenon: bash cannot recognize filenames or directories that have spaces, unless I am root/su. This is a typical example: $ mkdir "Foo Bar" $ cd Foo\ Bar/ bash: cd: Foo: No such file or directory $ su Password: # cd Foo\ Bar/ /home/oleg/tmp/Foo Bar Plat