Chris Davies chris-use...@roaima.co.uk writes:
Cam Hutchison c...@xdna.net wrote:
BK_LIST=()
Append to the array with +=
BK_LIST+=${PARAM}
This += syntax appears not to work with my version of bash
(4.1.5(1)-release from package bash 4.1-3). Instead I have
to do this:
BK_LIST+=(${PARAM})
Cam Hutchison c...@xdna.net wrote:
Sigh. Sorry, it was a typo. That explains why it did not work for the OP.
Phew!
These array things are new to me in a shell context - I've used
associative and indexed arrays for years in awk and perl, though - and
after your example didn't work I went digging
Cam Hutchison c...@xdna.net wrote:
BK_LIST=()
Append to the array with +=
BK_LIST+=${PARAM}
This += syntax appears not to work with my version of bash
(4.1.5(1)-release from package bash 4.1-3). Instead I have
to do this:
BK_LIST+=(${PARAM})
Was yours a typo, or is it something that now
When dealing with paths in bash i usually employ two things:
One is declaring arrays like this:
FILES_LIST=( )
And everytime I want to append to the array I go like this:
FILES_LIST=( ${FILES_LIST[@]} ${NEW_FILE} )
Obviously I will have problems if the paths or files have spaces in
their
Iuri Guilherme dos Santos Martins wrote:
When dealing with paths in bash i usually employ two things:
One is declaring arrays like this:
FILES_LIST=( )
And everytime I want to append to the array I go like this:
FILES_LIST=( ${FILES_LIST[@]} ${NEW_FILE} )
Obviously I will have problems if
Soare Catalin lolinux.so...@gmail.com writes:
Thank you everyone for replying, but unfortunately, nothing seems to work
for the moment, although all the answers appear to make sense.
First, the array solution appears to work, but when tar gets all the
parameters, they become a long string without
I wrote:
...
FILES_LIST=( ${FILES_LIST[@]} ${NEW_FILE} )
You can also write:
FILE_LIST[${#FILE_LIST[@]}]=${NEW_FILE}
Daniel
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive:
Soare Catalin lolinux.so...@gmail.com writes:
The script will take files or dirs as parameters and will back them up in a
presefined location, using tar. Problems arise when it will encounter files
or directories which contain spaces in their names.
then #is it an existing directory?
On 22/04/12 08:34, Cam Hutchison wrote:
Soare Catalinlolinux.so...@gmail.com writes:
The script will take files or dirs as parameters and will back them up in a
presefined location, using tar. Problems arise when it will encounter files
or directories which contain spaces in their names.
On Sun, Apr 22, 2012 at 10:25 PM, Dom to...@rpdom.net wrote:
On 22/04/12 08:34, Cam Hutchison wrote:
Soare Catalinlolinux.soare@gmail.**com lolinux.so...@gmail.com
writes:
The script will take files or dirs as parameters and will back them up
in a
presefined location, using tar.
On 22/04/12 22:02, Soare Catalin wrote:
On Sun, Apr 22, 2012 at 10:25 PM, Domto...@rpdom.net wrote:
On 22/04/12 08:34, Cam Hutchison wrote:
Soare Catalinlolinux.soare@gmail.**comlolinux.so...@gmail.com
writes:
The script will take files or dirs as parameters and will back them up
in a
Hello fellow Linux supporters!
I apologise if this specific thread is off topic to this mailing list.
I've been having problems with a backup script and am not sure how to make
this work.
So far, Mr. Google hasn't helped me much -- maybe my search terms have been
as dumb as I'm feeling right
BK_FULLPATH=${BK_LOCATION}/BACKUP_${DATETIME}.tar.bz2
tar -cjf $BK_FULLPATH $BK_LIST
Il giorno 21 aprile 2012 10:07, Soare Catalin lolinux.so...@gmail.com ha
scritto:
Hello fellow Linux supporters!
I apologise if this specific thread is off topic to this mailing list.
I've been having
Scusa ho svagliato
BK_FULLPATH=${BK_LOCATION}BACKUP_${DATETIME}.tar.bz2
tar -cjf $BK_FULLPATH $BK_LIST
Il giorno 21 aprile 2012 10:07, Soare Catalin lolinux.so...@gmail.com ha
scritto:
Hello fellow Linux supporters!
I apologise if this specific thread is off topic to this mailing list.
14 matches
Mail list logo