Re: A little Bash script to help you.

From: Dan Nelson (dnelson_at_allantgroup.com)
Date: 08/12/03

  • Next message: Craig Rose: "RE: Promise FastTrak 100"
    Date: Mon, 11 Aug 2003 17:22:07 -0500
    To: Matthew Graybosch <matthew@starbreaker.net>
    
    

    In the last episode (Aug 11), Matthew Graybosch said:
    > On Mon, 2003-08-11 at 17:49, Constantine wrote:
    > > I am writing a script, which involves unzipping some files. I would
    > > have to unzip 4 different zip-files from some directory, and I
    > > would need to unzip them to the directory, which would have the
    > > same name in it as the original zip-file, i.e. I would like to run
    > > something like "ls *.zip", have each file name recorded in some
    > > variable, and do a loop like "unzip
    > > $filename[$i] -d $filename[$i].unzipped/". Can someone help me with the
    > > code? How can I put the results of a command to a variable?
    >
    > The following assumes you have the bash port installed. Just change
    > the ARCHIVE_DIR variable to the full path of the directory in which
    > you have your zip files. Make sure to save this code to a file in
    > "~/bin". I suggest pasting the following code into "~/bin/munzip.sh".

    Note that this script runs just fine with /bin/sh, so you don't need
    bash.

    -- 
    	Dan Nelson
    	dnelson@allantgroup.com
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Craig Rose: "RE: Promise FastTrak 100"

    Relevant Pages

    • Re: simple sh scripting. How to put a result of a command to a variable?
      ... >> I am writing a script, which involves unzipping some files. ... >> need to unzip them to the directory, which would have the same name ...
      (freebsd-questions)
    • A little Bash script to help you.
      ... > I am writing a script, which involves unzipping some files. ... > unzip them to the directory, which would have the same name in it as the ...
      (freebsd-questions)
    • Re: [WR] round tuits
      ... Jackson Pillock wrote: ... I do, too many projects going, not enough time, priorities lean toward ... I started writing a precinct drama set in a locked psychiatric ward. ... Sent off my script. ...
      (misc.writing)
    • Re: Vinca script, cross bar angle - Ki Ri Ke
      ... of the Goddess, since the English title of the second book ... sacred script in The Goddesses and Gods of Old Europe, ... not exactly a scholarly publisher. ... writing scholars call "ideograms," and hence not as writing. ...
      (sci.lang)
    • Re: Vinca script, cross bar angle - Ki Ri Ke
      ... writing to anyone who studies writing carefully. ... Numbers are part of every language, ... you read chapter 8, The Sacred Script, of The Civilization ... The Language of the Goddess is about symbols "only." ...
      (sci.lang)