euglug.org

[작성자:] admin

  • [Eug-lug] shell evilness



    Jason LaPierThu Jul 6 14:19:04 PDT 2006

    > -----Original Message-----
    > From: euglug-bounces at euglug.org 
    > [mailto:euglug-bounces at euglug.org] On Behalf Of larry price
    > Sent: Thursday, July 06, 2006 11:20 AM
    > To: Eugene Unix and Gnu/Linux User Group
    > Subject: Re: [Eug-lug] shell evilness
    > 
    > well now,
    > 
    > larry at bluejay:~/week$ rm -r *;for d in 1 2 3 4 5 6 7; do mkdir `date
    > -v+${d}d +%A`; done
    > larry at bluejay:~/week$ ls
    > Friday          Monday          Saturday        Sunday
    > Thursday        Tuesday         Wednesday
    > 
    > 
    > works on systems from Freebsd 4.11 to 6.1
    > 
    > the disappearance of the -v option from other forms of date 
    > seems counterproductive.
    
    
    If I understand correctly what you're trying to do:
    
    $ date 
    Thu Jul  6 14:17:48 PDT 2006 
    
    $ date -d "today + 1 day" 
    Fri Jul  7 14:17:56 PDT 2006 
    
    $ date +%A 
    Thursday 
    
    $ date -d "today + 1 day" +%A 
    Friday 
    
    That help?
    
    - Jason
    
    
    > 
    > 
    > 
    > On 7/6/06, Patrick R. Wade <prwade at oip.net> wrote:
    > > larry price wrote:
    > > > mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    > > >
    > > > challenge to the perl monks; do the same thing in fewer 
    > characters...
    > >
    > > prwade at lusitania:~$ uname -a
    > > Linux lusitania 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006
    > > i686 GNU/Linux
    > > prwade at lusitania:~$ ( export d=1 ; date -v+${d}d +%A )
    > > date: invalid option -- v
    > > Try `date --help' for more information.
    > > prwade at lusitania:~$
    > >
    > >
    > > --
    > > On two occasions I have been asked [by members of 
    > Parliament!], 'Pray, 
    > > Mr. Babbage, if you put into the machine wrong figures, 
    > will the right 
    > > answers come out?' I am not able rightly to apprehend the kind of 
    > > confusion of ideas that could provoke such a question.
    > >         -- Charles Babbage
    > > _______________________________________________
    > > EUGLUG mailing list
    > > euglug at euglug.org
    > > http://www.euglug.org/mailman/listinfo/euglug
    > >
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
    
    
    Jason LaPier
    Network Manager
    TACS / WRRC / NPSO
    University of Oregon
    
    
  • [Eug-lug] shell evilness



    Patrick R. WadeThu Jul 6 12:26:13 PDT 2006

    Fred James wrote:
    > Patrick R. Wade wrote:
    > 
    >> larry price wrote:
    >>
    >>  
    >>
    >>> the disappearance of the -v option from other forms of date seems
    >>> counterproductive.
    >>>
    >>>   
    >>
    >> Well, of course!  It's GNU, it needs to be gratuitously different!  Like
    >> the lack of the -o option in ls to display filesystem flags, one of my
    >> favorite GNU deletions!
    >>  
    >>
    > Patrick R. Wade
    > Sounds very FreeBSD centric to me - I have always found ls -o defined as
    > (see below) - or did I misunderstand?
    
    -o does do something in GNU ls, just something not very useful.  The
    requirement to run
    
    $ ls -l foo && lsattr foo
    
    instead of
    
    $ ls -ol foo
    
    has annoyed me for a while, despite the fact that i began my *NIX life
    with GNU utilities and came to BSD ones later.
    
    -- 
    On two occasions I have been asked [by members of Parliament!], 'Pray,
    Mr. Babbage, if you put into the machine wrong figures, will the right
    answers come out?' I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.
    	-- Charles Babbage
    
  • [Eug-lug] shell evilness



    Fred JamesThu Jul 6 12:07:59 PDT 2006

    Patrick R. Wade wrote:
    
    >larry price wrote:
    >
    >  
    >
    >>the disappearance of the -v option from other forms of date seems
    >>counterproductive.
    >>
    >>    
    >>
    >
    >Well, of course!  It's GNU, it needs to be gratuitously different!  Like
    >the lack of the -o option in ls to display filesystem flags, one of my
    >favorite GNU deletions!
    >  
    >
    Patrick R. Wade
    Sounds very FreeBSD centric to me - I have always found ls -o defined as 
    (see below) - or did I misunderstand?
    Regards
    Fred James
    
         -o   The same as -l, except that the group is not printed.
     
    
    
  • [Eug-lug] shell evilness



    Patrick R. WadeThu Jul 6 11:37:40 PDT 2006

    larry price wrote:
    
    > 
    > the disappearance of the -v option from other forms of date seems
    > counterproductive.
    > 
    
    Well, of course!  It's GNU, it needs to be gratuitously different!  Like
    the lack of the -o option in ls to display filesystem flags, one of my
    favorite GNU deletions!
    
    -- 
    On two occasions I have been asked [by members of Parliament!], 'Pray,
    Mr. Babbage, if you put into the machine wrong figures, will the right
    answers come out?' I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.
    	-- Charles Babbage
    
  • [Eug-lug] shell evilness



    larry priceThu Jul 6 11:19:57 PDT 2006

    well now,
    
    larry at bluejay:~/week$ rm -r *;for d in 1 2 3 4 5 6 7; do mkdir `date
    -v+${d}d +%A`; done
    larry at bluejay:~/week$ ls
    Friday          Monday          Saturday        Sunday
    Thursday        Tuesday         Wednesday
    
    
    works on systems from Freebsd 4.11 to 6.1
    
    the disappearance of the -v option from other forms of date seems
    counterproductive.
    
    
    
    On 7/6/06, Patrick R. Wade <prwade at oip.net> wrote:
    > larry price wrote:
    > > mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    > >
    > > challenge to the perl monks; do the same thing in fewer characters...
    >
    > prwade at lusitania:~$ uname -a
    > Linux lusitania 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006
    > i686 GNU/Linux
    > prwade at lusitania:~$ ( export d=1 ; date -v+${d}d +%A )
    > date: invalid option -- v
    > Try `date --help' for more information.
    > prwade at lusitania:~$
    >
    >
    > --
    > On two occasions I have been asked [by members of Parliament!], 'Pray,
    > Mr. Babbage, if you put into the machine wrong figures, will the right
    > answers come out?' I am not able rightly to apprehend the kind of
    > confusion of ideas that could provoke such a question.
    >         -- Charles Babbage
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    
  • [Eug-lug] shell evilness



    Patrick R. WadeThu Jul 6 11:00:40 PDT 2006

    larry price wrote:
    > mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    > 
    > challenge to the perl monks; do the same thing in fewer characters...
    
    prwade at lusitania:~$ uname -a
    Linux lusitania 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006
    i686 GNU/Linux
    prwade at lusitania:~$ ( export d=1 ; date -v+${d}d +%A )
    date: invalid option -- v
    Try `date --help' for more information.
    prwade at lusitania:~$
    
    
    -- 
    On two occasions I have been asked [by members of Parliament!], 'Pray,
    Mr. Babbage, if you put into the machine wrong figures, will the right
    answers come out?' I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.
    	-- Charles Babbage
    
  • [Eug-lug] Re: EUGLUG Digest, Vol 28, Issue 5



    Alexis Gonzalez-ArguinzoniThu Jul 6 10:58:48 PDT 2006

    i just bought a dual core "intel 940" i think this will run the 64 bit os.
    sooo i'll love a copy please!
    Alexis
    541 3594156
    
    On 7/5/06, euglug-request at euglug.org <euglug-request at euglug.org> wrote:
    >
    > Send EUGLUG mailing list submissions to
    >         euglug at euglug.org
    >
    > To subscribe or unsubscribe via the World Wide Web, visit
    >         http://www.euglug.org/mailman/listinfo/euglug
    > or, via email, send a message with subject or body 'help' to
    >         euglug-request at euglug.org
    >
    > You can reach the person managing the list at
    >         euglug-owner at euglug.org
    >
    > When replying, please edit your Subject line so it is more specific
    > than "Re: Contents of EUGLUG digest..."
    >
    >
    > Today's Topics:
    >
    >    1. Re:  Ubuntu (Garl Grigsby)
    >
    >
    > ----------------------------------------------------------------------
    >
    > Message: 1
    > Date: Wed, 05 Jul 2006 11:04:42 -0700
    > From: Garl Grigsby <badd_karma at comcast.net>
    > Subject: Re: [Eug-lug] Ubuntu
    > To: euglug at euglug.org
    > Message-ID: <44ABFF3A.9090508 at comcast.net>
    > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    >
    > Speaking of Ubuntu CDs, I ordered some a few CDs a while back for a
    > project a friend and I were working on at the time. When the order
    > showed up, we were a bit surprised to see that we ended up getting a few
    > more than we had requested. I've done my best over the last couple of
    > months to hand them out, but I still have a few left. Well, I guess I
    > have more than a few. I've got a crap load. Without Counting, I'd guess
    > I have 45 x86, 10 x86-64, and 5 Mac versions, all Breezy Badger.
    >
    > So, if somebody wanted them, they are here for the taking. I'll probably
    > keep a few, just to hand out to people, but... If you're interested, let
    > me know.
    >
    > Garl
    > > I spoke too soon.  They were in today's mail.
    > >
    > > I have 10 Ubuntu CDs and 10 Kubuntu CDs.  Would someone who's working
    > > at the Fair like to get them from me?  I don't think I'm fairbound
    > > this year.
    > >
    > >
    >
    >
    >
    > ------------------------------
    >
    > _______________________________________________
    > EUGLUG mailing list
    > EUGLUG at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    >
    > End of EUGLUG Digest, Vol 28, Issue 5
    > *************************************
    >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://www.euglug.org/pipermail/euglug/attachments/20060706/dffa708a/attachment.htm
    
  • [Eug-lug] shell evilness



    Bob MillerThu Jul 6 10:45:02 PDT 2006

    Fred James wrote:
    
    > Perhaps someone could verify that the -v options is a valid option of 
    > 'data' on some *nix system other than FreeBSD?  I have not been able to 
    > find it on any of the *nix systems available to me (SGI and Unisys, as 
    > well as Linux).  Granted, that may not mean too much.
    
    Also not in (a very old release of) OpenBSD.
    
    Therefore I submit this perl script equivalent to Larry's original
    post. (-:
    
    	$ perl -e 'system"date -v;"x7'
    	date: invalid option -- v
    	Try `date --help' for more information.
    	date: invalid option -- v
    	Try `date --help' for more information.
    	date: invalid option -- v
    	Try `date --help' for more information.
    	date: invalid option -- v
    	Try `date --help' for more information.
    	date: invalid option -- v
    	Try `date --help' for more information.
    	date: invalid option -- v
    	Try `date --help' for more information.
    	date: invalid option -- v
    	Try `date --help' for more information.
    
    
    -- 
    Bob Miller                              K<bob>
                                            kbob at jogger-egg.com
    
  • [Eug-lug] shell evilness



    Fred JamesThu Jul 6 05:28:58 PDT 2006

    larry price wrote:
    
    > a. the -v option adjusts the time to be displayed
    > date -v+1d +%A
    > prints tomorrows weekday name.
    >
    > Neil is correct in pointing out that current versions of GNU coreutils
    > do not support the -v option, I was running it on a FreeBSD box, which
    > uses the freebsd version of the command.
    >
    > I'm somewhat curious to know why GNU decided to drop the -v option as
    > it can be quite useful.
    > ... (omitted) ...
    
    Larry Price
    Perhaps someone could verify that the -v options is a valid option of 
    'data' on some *nix system other than FreeBSD?  I have not been able to 
    find it on any of the *nix systems available to me (SGI and Unisys, as 
    well as Linux).  Granted, that may not mean too much.
    Regards
    Fred James
    
    
  • [Eug-lug] shell evilness



    larry priceWed Jul 5 22:51:20 PDT 2006

    a. the -v option adjusts the time to be displayed
    date -v+1d +%A
    prints tomorrows weekday name.
    
    Neil is correct in pointing out that current versions of GNU coreutils
    do not support the -v option, I was running it on a FreeBSD box, which
    uses the freebsd version of the command.
    
    I'm somewhat curious to know why GNU decided to drop the -v option as
    it can be quite useful.
    
    b. there was a bug in the original post; it should have been 1..7 to
    cover the entire week.
    
    c. there is only one day of the week that it actually generates days
    in lexicographical order; on the other six days the ouput of 'ls' and
    'ls -t' will differ (assuming you ran the command in an empty
    directory)
    
    
    
    On 7/5/06, Allen Brown <abrown at peak.org> wrote:
    > larry price wrote:
    > > mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    > >
    > > challenge to the perl monks; do the same thing in fewer characters...
    >
    > I would do it in shell in fewer characters.
    > for d in 1 2 3 4 5 6; do mkdir `date -v+${d}d +%A`; done
    >
    > or
    > mkdir $(for d in 1 2 3 4 5 6; do date -v+${d}d +%A; done)
    >
    > Only problem is that I don't know what the -v option does.
    > So the format string doesn't work.  But the shell part does.
    > --
    > Allen Brown  abrown at peak.org  http://www.peak.org/~abrown/
    >    You can lead a horticulture but you can't make her think. ---Dorothy
    > Parker
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >