Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #11791

Re: composition ? piping

From Joe Beanfish <joebeanfish@nospam.duh>
Newsgroups comp.os.linux.misc
Subject Re: composition ? piping
Date 2014-08-22 13:39 +0000
Organization A noiseless patient Spider
Message-ID <lt7h66$fe4$1@dont-email.me> (permalink)
References <pan.2014.08.21.20.56.55@gmail.com>

Show all headers | View raw


On Thu, 21 Aug 2014 20:50:04 +0000, Unknown wrote:

> Show me the line-count of the newest [by change time] file,
> in the same dir as the executable file:M;
>   in a compositional/non*nix syntax might be:
> M which | dirname | ls -t | head -1 | cat | wc -l
> 
> How is it in this ad hoc *nix mess ?

Calling *nix a mess when your utopian "maybe" syntax doesn't even exist
is uncalled for. I know you like to whine and present every question as
a confrontation, but give it a break. Just ask your questions without
the bile.

Below is one way. Replace "M" with the executable name.

execdir="`dirname \`type -p M\``" ;wc -l "$execdir/`ls -t \"$execdir\"|
head -1`"

> 
> Also, is 'rename-piping' possible?
> eg. instead of:
> cp A b.wav; aplay b.wav ; rm b.wav
>  aplay `<process file A as fileb.wav would be processed>

You're asking the wrong question. The question is how to make "aplay"
play a file without a .wav extension. The answer is
   aplay <A
or
   aplay A
It'll figure it out without the extension. At least mine does
$ aplay --version
aplay: version 1.0.27.2 by Jaroslav Kysela <perex@perex.cz>

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

composition ? piping Unknown <dog@gmail.com> - 2014-08-21 20:50 +0000
  Re: composition ? piping Joe Beanfish <joebeanfish@nospam.duh> - 2014-08-22 13:39 +0000
  Re: composition ? piping John Hasler <jhasler@newsguy.com> - 2014-08-22 10:16 -0500
    Re: composition ? piping Rich <rich@example.invalid> - 2014-08-22 17:13 +0000
    Re: composition ? piping Unknown <dog@gmail.com> - 2014-09-21 13:09 +0000
      Re: composition ? piping Jerry Peters <jerry@example.invalid> - 2014-09-21 20:18 +0000
        Re: composition ? piping Joe Beanfish <joebeanfish@nospam.duh> - 2014-09-22 13:39 +0000
          Re: composition ? piping Michael Baeuerle <michael.baeuerle@stz-e.de> - 2014-09-26 08:26 +0000
            Re: composition ? piping Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-09-26 13:01 -0400
              Re: composition ? piping Michael Baeuerle <michael.baeuerle@stz-e.de> - 2014-09-29 08:54 +0000
                Re: composition ? piping Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2014-09-29 15:47 +0000
                Re: composition ? piping John Hasler <jhasler@newsguy.com> - 2014-09-29 11:41 -0500
            Re: composition ? piping "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2014-09-27 12:49 +0200
      Re: composition ? piping Bill Marcum <bill.marcum57@yahoo.com> - 2014-09-25 14:58 -0400

csiph-web