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
> 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
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:
> >
> > #
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
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
> 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
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
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="
&
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
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="
; 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
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
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
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=$
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
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'
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
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
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
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
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
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
"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
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"
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
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
26 matches
Mail list logo