soxi grep "Sample Encoding" "Sample Rate"

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
How can i get Sample Encoding and Sample Rate on one line?

I tried 

for f in *.wav ; do soxi "$f" | grep "Sample Encoding" "Sample Rate" ;done

But this is not working.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Pascal Giard
On Wed, Jul 11, 2012 at 8:52 AM, Hendrikus Godvliet
<[hidden email]> wrote:
> How can i get Sample Encoding and Sample Rate on one line?
>
> I tried
>
> for f in *.wav ; do soxi "$f" | grep "Sample Encoding" "Sample Rate" ;done
>
> But this is not working.

Of course not. You are asking grep to find a line where both
expressions are present.
While using 'grep "Sample Rate\|Sample Encoding"' might partly do what
you expect, I'm not sure that's quite it yet as you said "_on_ one
line".

In any case, this is in no way related to SoX.

Cheers,

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Dave Graff
In reply to this post by hendrikus godvliet

On Jul 11, 2012, at 8:52 AM, Hendrikus Godvliet wrote:

> How can i get Sample Encoding and Sample Rate on one line?
>
> I tried
>
> for f in *.wav ; do soxi "$f" | grep "Sample Encoding" "Sample Rate" ;done

Try it like this:

 for f in *.wav
 do
  echo -n $i
  soxi "$f" | perl -lne 's/\s+:/:/; $o.="\t$_" if /Encoding|Sample Rate/; END{print $o}'
 done


        Dave Graff


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Dave Graff
Apologies -- I incorrectly mixed my own shell-loop habit ("i" as the loop variable) with yours.  I should have said:

> for f in *.wav
> do
>  echo -n $f
>  soxi "$f" | perl -lne 's/\s+:/:/; $o.="\t$_" if /Encoding|Sample Rate/; END{print $o}'
> done

        Dave Graff


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Jesse Ross-6
In reply to this post by hendrikus godvliet
Note also that you don't need to be grepping in the first place; check out the -e and -r options in the man page.

best,
jesse


On Wed, Jul 11, 2012 at 8:52 AM, Hendrikus Godvliet <[hidden email]> wrote:
How can i get Sample Encoding and Sample Rate on one line?

I tried 

for f in *.wav ; do soxi "$f" | grep "Sample Encoding" "Sample Rate" ;done

But this is not working.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Pascal Giard
On Wed, Jul 11, 2012 at 10:12 AM, Jesse Ross <[hidden email]> wrote:
> Note also that you don't need to be grepping in the first place; check out
> the -e and -r options in the man page.

Also noteworthy, only one of these options will be honored i.e. you
can't used both at the same time.

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
In reply to this post by Pascal Giard
Why I tried to get what i won't with grep is this:

[muse@muse Public]$ soxi -s t.wav
483328
[muse@muse Public]$ soxi -sr t.wav
48000
[muse@muse Public]$ soxi -s -r t.wav

I like to get the Sample Rate and Precision on one line!




On Wed, Jul 11, 2012 at 3:37 PM, Pascal Giard <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 8:52 AM, Hendrikus Godvliet
<[hidden email]> wrote:
> How can i get Sample Encoding and Sample Rate on one line?
>
> I tried
>
> for f in *.wav ; do soxi "$f" | grep "Sample Encoding" "Sample Rate" ;done
>
> But this is not working.

Of course not. You are asking grep to find a line where both
expressions are present.
While using 'grep "Sample Rate\|Sample Encoding"' might partly do what
you expect, I'm not sure that's quite it yet as you said "_on_ one
line".

In any case, this is in no way related to SoX.

Cheers,

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Rafal Maszkowski
On Wed, Jul 11, 2012 at 10:00:44PM +0200, Hendrikus Godvliet wrote:
> Why I tried to get what i won't with grep is this:
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

echo `soxi -s t.wav` `soxi -sr t.wav`

R.
--
Жить надо так, чтобы тебя помнили и сволочи. (Фаина Георгиевна Раневская)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Pascal Giard
In reply to this post by hendrikus godvliet
On Wed, Jul 11, 2012 at 4:00 PM, Hendrikus Godvliet
<[hidden email]> wrote:
> Why I tried to get what i won't with grep is this:
>
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

It's getting more and more confusing.
What do you want and how would you like to have it formatted?

Sample rate came twice in your emails, so I assume that is correct.
However, the other thing you want is not clear. You mentioned each of
the following: sample encoding, number of samples and finally
precision.

Finally, as I mentioned, you can ask for 2 values to soxi. It's either
only one or all of them.

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
In reply to this post by Rafal Maszkowski
That only gif me

[muse@muse Public]$ echo 'soxi -s t.wav' 'soxi -r t.wav'
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ echo soxi -s t.wav soxi -r t.wav
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ soxi -s t.wav soxi -r t.wav
48000
soxi FAIL formats: can't open input file `soxi': No such file or directory
48000
[muse@muse Public]$

What i like to get is both on one line 16 48000


On Wed, Jul 11, 2012 at 10:08 PM, Rafal Maszkowski <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 10:00:44PM +0200, Hendrikus Godvliet wrote:
> Why I tried to get what i won't with grep is this:
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

echo `soxi -s t.wav` `soxi -sr t.wav`

R.
--
Жить надо так, чтобы тебя помнили и сволочи. (Фаина Георгиевна Раневская)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Jesse Ross-6
You're using single quotes instead of backticks.

jesse


On Wed, Jul 11, 2012 at 4:13 PM, Hendrikus Godvliet <[hidden email]> wrote:
That only gif me

[muse@muse Public]$ echo 'soxi -s t.wav' 'soxi -r t.wav'
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ echo soxi -s t.wav soxi -r t.wav
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ soxi -s t.wav soxi -r t.wav
48000
soxi FAIL formats: can't open input file `soxi': No such file or directory
48000
[muse@muse Public]$

What i like to get is both on one line 16 48000



On Wed, Jul 11, 2012 at 10:08 PM, Rafal Maszkowski <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 10:00:44PM +0200, Hendrikus Godvliet wrote:
> Why I tried to get what i won't with grep is this:
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

echo `soxi -s t.wav` `soxi -sr t.wav`

R.
--
Жить надо так, чтобы тебя помнили и сволочи. (Фаина Георгиевна Раневская)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
In reply to this post by Pascal Giard
You don't need to get confused  - you are helpng me - and finally I got my answer:

<Finally, as I mentioned, you can ask for 2 values to soxi. It's either
only one or all of them.

O.k that's all I wont to know
That's why i look for grep ore something else who can print it on one line

Thanks for helping me

Hendrikus





On Wed, Jul 11, 2012 at 10:10 PM, Pascal Giard <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 4:00 PM, Hendrikus Godvliet
<[hidden email]> wrote:
> Why I tried to get what i won't with grep is this:
>
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

It's getting more and more confusing.
What do you want and how would you like to have it formatted?

Sample rate came twice in your emails, so I assume that is correct.
However, the other thing you want is not clear. You mentioned each of
the following: sample encoding, number of samples and finally
precision.

Finally, as I mentioned, you can ask for 2 values to soxi. It's either
only one or all of them.

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

Pascal Giard
In reply to this post by hendrikus godvliet
On Wed, Jul 11, 2012 at 4:13 PM, Hendrikus Godvliet
<[hidden email]> wrote:

> That only gif me
>
> [muse@muse Public]$ echo 'soxi -s t.wav' 'soxi -r t.wav'
> soxi -s t.wav soxi -r t.wav
> [muse@muse Public]$ echo soxi -s t.wav soxi -r t.wav
> soxi -s t.wav soxi -r t.wav
> [muse@muse Public]$ soxi -s t.wav soxi -r t.wav
> 48000
> soxi FAIL formats: can't open input file `soxi': No such file or directory
> 48000
> [muse@muse Public]$
>
> What i like to get is both on one line 16 48000

Backticks FTW!

e.g.
$ echo `soxi -b /tmp/output.wav` `soxi -r /tmp/output.wav`
16 88200

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
In reply to this post by Jesse Ross-6
Yes sorry = i tough it came from a windows machine that why i changed it - i wil replace them thanks

On Wed, Jul 11, 2012 at 10:15 PM, Jesse Ross <[hidden email]> wrote:
You're using single quotes instead of backticks.

jesse


On Wed, Jul 11, 2012 at 4:13 PM, Hendrikus Godvliet <[hidden email]> wrote:
That only gif me

[muse@muse Public]$ echo 'soxi -s t.wav' 'soxi -r t.wav'
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ echo soxi -s t.wav soxi -r t.wav
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ soxi -s t.wav soxi -r t.wav
48000
soxi FAIL formats: can't open input file `soxi': No such file or directory
48000
[muse@muse Public]$

What i like to get is both on one line 16 48000



On Wed, Jul 11, 2012 at 10:08 PM, Rafal Maszkowski <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 10:00:44PM +0200, Hendrikus Godvliet wrote:
> Why I tried to get what i won't with grep is this:
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

echo `soxi -s t.wav` `soxi -sr t.wav`

R.
--
Жить надо так, чтобы тебя помнили и сволочи. (Фаина Георгиевна Раневская)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
In reply to this post by Jesse Ross-6
Thanks this is working

[muse@muse Public]$ echo  `soxi -s t.wav` `soxi -r t.wav`
483328 48000




On Wed, Jul 11, 2012 at 10:15 PM, Jesse Ross <[hidden email]> wrote:
You're using single quotes instead of backticks.

jesse


On Wed, Jul 11, 2012 at 4:13 PM, Hendrikus Godvliet <[hidden email]> wrote:
That only gif me

[muse@muse Public]$ echo 'soxi -s t.wav' 'soxi -r t.wav'
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ echo soxi -s t.wav soxi -r t.wav
soxi -s t.wav soxi -r t.wav
[muse@muse Public]$ soxi -s t.wav soxi -r t.wav
48000
soxi FAIL formats: can't open input file `soxi': No such file or directory
48000
[muse@muse Public]$

What i like to get is both on one line 16 48000



On Wed, Jul 11, 2012 at 10:08 PM, Rafal Maszkowski <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 10:00:44PM +0200, Hendrikus Godvliet wrote:
> Why I tried to get what i won't with grep is this:
> [muse@muse Public]$ soxi -s t.wav
> 483328
> [muse@muse Public]$ soxi -sr t.wav
> 48000
> [muse@muse Public]$ soxi -s -r t.wav
>
> I like to get the Sample Rate and Precision on one line!

echo `soxi -s t.wav` `soxi -sr t.wav`

R.
--
Жить надо так, чтобы тебя помнили и сволочи. (Фаина Георгиевна Раневская)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: soxi grep "Sample Encoding" "Sample Rate"

hendrikus godvliet
In reply to this post by Pascal Giard
Yes thanks you Pascal that's it - it works

Thanks for helping me !

Hendrikus

On Wed, Jul 11, 2012 at 10:20 PM, Pascal Giard <[hidden email]> wrote:
On Wed, Jul 11, 2012 at 4:13 PM, Hendrikus Godvliet
<[hidden email]> wrote:
> That only gif me
>
> [muse@muse Public]$ echo 'soxi -s t.wav' 'soxi -r t.wav'
> soxi -s t.wav soxi -r t.wav
> [muse@muse Public]$ echo soxi -s t.wav soxi -r t.wav
> soxi -s t.wav soxi -r t.wav
> [muse@muse Public]$ soxi -s t.wav soxi -r t.wav
> 48000
> soxi FAIL formats: can't open input file `soxi': No such file or directory
> 48000
> [muse@muse Public]$
>
> What i like to get is both on one line 16 48000

Backticks FTW!

e.g.
$ echo `soxi -b /tmp/output.wav` `soxi -r /tmp/output.wav`
16 88200

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users