Re: Adding to the command line via variables

From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 07/30/05

  • Next message: Chris F.A. Johnson: "Re: Adding to the command line via variables"
    Date: Sat, 30 Jul 2005 10:22:24 -0400
    
    

    On Sat, 30 Jul 2005 13:57:55 GMT, Jeff Kloek
      <Jeff@Kloek.com> wrote:
    > Hello. I'm trying to figure out how I can build a command line using the
    > output of the ls |grep command. The problem is the number of files returned
    > will vary.
    > As an example, one time might find output1, output2 and output3, and another
    > time it might also include output4 and output5.
    >
    > How can I use the output of "ls |grep output" to build a command line that
    > does the following:
    > lp -d printername outputX outputX outputX ?
    > I don't expect to ever exceed the allowable count of command line
    > parameters.
    > Any ideas would be greatly appreciated!!
    >
    lp -d $(ls | grep output)
    ls | grep output | xargs lp -d
    lp -d printername output*

    -- 
    Tonight you will pay the wages of sin; Don't forget to leave a tip.
    

  • Next message: Chris F.A. Johnson: "Re: Adding to the command line via variables"

    Relevant Pages

    • Re: Well guys the writing is on the wall !!
      ... if you want to enable the testing repo you can do with the usual command ... Heh heh! ... ..the Sin of Ignorance, ...
      (Fedora)
    • Re: Evolution Contacts stop working
      ... error logging, until I ran it from the command line. ... I never thought to try that by command line, ... acting up, from time to time, and has been frustrating as hell. ... ...the Sin of Stupidity. ...
      (Fedora)
    • Re: Well guys the writing is on the wall !!
      ... have root privileges) ... if you want to enable the testing repo you can do with the usual command ... ..the Sin of Ignorance, ...
      (Fedora)
    • Re: Problem compiling simple C program
      ... the gcc command line, otherwise the linker does not know about the sin() ... In C you have to tell the linker to use it ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Blender update bombs
      ... I just installed the update to blender and when I launch it, ... ld claimed to not recognize the file structure, ... blender-bin also blows up from command line and blenderplayer comes up ... ..the Sin of Ignorance, ...
      (Fedora)