<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title>Seeking help with bash command piping, redirection, e.g. in All Things Unix</title>
<link>http://www.dslreports.com/forum/r20455982</link>
<description></description>
<language>en</language>
<pubDate>Thu, 21 Aug 2008 01:07:25 EDT</pubDate>
<lastBuildDate>Thu, 21 Aug 2008 01:07:25 EDT</lastBuildDate>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20464920</link>
<description><![CDATA[<A HREF="/useremail/u/474027"><b>rolfp</b></A> : Well, I've made a text file application and associated it with .qcp in konqueror:<br><br>rm -rf ~/tmp/test/; mkdir ~/tmp/test/; cp %u ~/tmp/test/; find ~/tmp/test/ -type f -name *.qcp |while read line;do ~/tarballs/pure_voice_conv/pvconv "${line}" && rm -f "${line}" && echo "\"${line}\""|sed 's/\.qcp/\.wav/i'|xargs play;done<br><br>The first two commands get executed but my attempt to use %u, apparently, is not working:<br><br><textarea name="code" class="text" cols=50 rows=10>&#91;rolf@localhost ~&#93;$ ll tmp/test/&#012;total 0&#012;&#91;rolf@localhost ~&#93;$ ll tmp/ | grep test&#012;drwxr-xr-x 2 rolf rolf       48 2008-05-10 09:32 test/&#012;&#91;rolf@localhost ~&#93;$ ll tmp/test/&#012;total 0&#012;&#91;rolf@localhost ~&#93;$ ll tmp/ | grep test&#012;drwxr-xr-x 2 rolf rolf       48 2008-05-11 07:50 test/&#012;</textarea><!--end code block--><br>The two listings were done just before and just after clicking on the .qcp file in konqueror.<br>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20464920</guid>
<pubDate>Sun, 11 May 2008 10:57:21 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20461080</link>
<description><![CDATA[<A HREF="/useremail/u/474027"><b>rolfp</b></A> : Yeah, not having stdout seems to be a problem, thanks for the perspective.  I've used your command that works for me in a modified fashion that, in my imagination, can be further developed to be called when a .qcp file is clicked in seamonkey or konqueror.  Both use %u for this sort of thing and there is an exec statement documented for konqueror, so I'm going to try along those lines after work.<br><textarea name="code" class="text" cols=50 rows=10>&#91;rolf@localhost test&#93;$ pwd&#012;/home/rolf/tarballs/pure_voice_conv/test&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ rm -rf ~/tmp/test/; mkdir ~/tmp/test/; cp 5-7-08\ 422\ pm.qcp ~/tmp/test/; find ~/tmp/test/ -type f -name *.qcp |while read line;do ~/tarballs/pure_voice_conv/pvconv "${line}" &amp;&amp; rm -f "${line}" &amp;&amp; echo "\"${line}\""|sed 's/\.qcp/\.wav/i'|xargs play;done&#012; &#012;Input File     : '/home/rolf/tmp/test/5-7-08 422 pm.wav'&#012;Sample Size    : 16-bit (2 bytes)&#012;Sample Encoding: signed (2's complement)&#012;Channels       : 1&#012;Sample Rate    : 8000&#012; &#012;Time: 00:12.28 &#91;00:00.00&#93; of 00:12.28 (100% ) Samples out: 98.2k Clips: 0&#012;Done.&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ ls ~/tmp/test/&#012;5-7-08 422 pm.wav&#012; &#012;</textarea><!--end code block-->]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20461080</guid>
<pubDate>Sat, 10 May 2008 11:18:16 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20459522</link>
<description><![CDATA[<A HREF="/useremail/u/902719"><b>evilghost</b></A> : pvconv doesnt' support output to stdout, therefore, you're stuck writing a WAV file unless you write it to /dev/dsp directly, which may work but I doubt it...<br><br><textarea name="code" class="text" cols=50 rows=10>find *.qcp -type f|while read line;do ./pvconv "$line" /dev/dsp;done &#012;</textarea><!--end code block-->]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20459522</guid>
<pubDate>Fri, 09 May 2008 22:29:22 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20459235</link>
<description><![CDATA[<A HREF="/useremail/u/474027"><b>rolfp</b></A> : Hi, one of them works for me, the one from your first post but, it seems to me, something similar that can be called as a helper application can be done.  I was thinking calling the conversion executable and piping stdout (?) to play would do the trick but not so much.<br><br>Thanks.<br><br><textarea name="code" class="text" cols=50 rows=10>&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ ./pvconv 5-7-08\ 422\ pm.qcp - &gt; /dev/dsp&#012;ERROR: Unknown command line option '-'&#012; &#012;&#91;..&#93;&#012; &#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ find *.qcp -type f|while read line;do pvconv "$line" - &gt; /dev/dsp;done&#012;bash: pvconv: command not found&#012;&#91;rolf@localhost test&#93;$ find *.qcp -type f|while read line;do ./pvconv "$line" - &gt; /dev/dsp;done&#012;ERROR: Unknown command line option '-'&#012; &#012;&#91;..&#93;&#012; &#012;&#91;rolf@localhost test&#93;$ find *.qcp -type f|while read line;do ./pvconv "${line}" &amp;&amp; rm -f "${line}" &amp;&amp; echo "\"${line}\""|sed 's/\.qcp/\.wav/i'|xargs play;done&#012; &#012;Input File     : '5-7-08 422 pm.wav'&#012;Sample Size    : 16-bit (2 bytes)&#012;Sample Encoding: signed (2's complement)&#012;Channels       : 1&#012;Sample Rate    : 8000&#012; &#012;Time: 00:12.28 &#91;00:00.00&#93; of 00:12.28 (100% ) Samples out: 98.2k Clips: 0&#012;Done.&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.wav  pvconv*&#012; &#012;</textarea><!--end code block-->]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20459235</guid>
<pubDate>Fri, 09 May 2008 21:19:00 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20459194</link>
<description><![CDATA[<A HREF="/useremail/u/474027"><b>rolfp</b></A> : Hi, I can get the wav file and play it, I just wanted to automate the process in order to give a 'helper application' to seamonkey or konqueror so the browser will be able to play a qcp file when I click on it.  Thanks.<br><br><textarea name="code" class="text" cols=50 rows=10>&#91;rolf@localhost test&#93;$ ./pvconv '-?'&#012;ERROR: Unknown command line option '?'&#012; &#012;pvconv v3.1.0: converts PCM (mono, 8 kHz, 16-bit) wav file to&#012;PureVoice qcp file, and vice-versa.&#012; &#012;Copyright (C) 1998-2005 by QUALCOMM, Inc.  All Rights Reserved&#012; &#012;Usage : pvconv &#91;-h&#93; &#91;-v&#93; &#91;-r &lt;rateset&gt;&#93;&#012;               infile &#91;outfile&#93;&#012; &#012;       -r      : Select rate set:&#012;                   vfr = variable rate, full rate max (default)&#012;                   vhr = variable rate, half rate max&#012;                   ffr = fixed full rate&#012;                   fhr = fixed half rate&#012;       -h      : Display this help (usage) information&#012;       -v      : Display program version information&#012; &#012;       infile  : wav or qcp file to convert&#012;       outfile : qcp or wav file&#012; &#012;For more information about QUALCOMM PureVoice(tm), visit&#012;&lt;http://www.cdmatech.com/solutions/products/purevoice.jsp&gt;&#012; &#012;&#91;rolf@localhost test&#93;$ play '-?'&#012;play: invalid option -- ?&#012;play: SoX v14.0.1&#012;&#91;..&#93;&#012;</textarea><!--end code block-->]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20459194</guid>
<pubDate>Fri, 09 May 2008 21:07:51 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20456409</link>
<description><![CDATA[<A HREF="/useremail/u/902719"><b>evilghost</b></A> : Optionally even:<br><textarea name="code" class="text" cols=50 rows=10>find *.qcp -type f|while read line;do pvconv "$line" - &gt; /dev/dsp;done&#012;</textarea><!--end code block-->]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20456409</guid>
<pubDate>Fri, 09 May 2008 11:09:08 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20456383</link>
<description><![CDATA[<A HREF="/useremail/u/902719"><b>evilghost</b></A> : Find all .qcp files, convert to WAV, remove qcp, play converted wav.<br><br><textarea name="code" class="text" cols=50 rows=10>find *.qcp -type f|while read line;do ./pvconv "${line}" &amp;&amp; rm -f "${line}" &amp;&amp; echo "\"${line}\""|sed 's/\.qcp/\.wav/i'|xargs play;done&#012;</textarea><!--end code block-->]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20456383</guid>
<pubDate>Fri, 09 May 2008 11:04:57 EDT</pubDate>
</item>

<item>
<title>Re: Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20456289</link>
<description><![CDATA[<A HREF="/useremail/u/830709"><b>pablo2525</b></A> : I think I understand what you're trying to do.<br><br>Let me recap and see if I've understood your request, you wish to unpack a `.qcq' file and have `play' play the unpacked .wav file.<br><br>There are several ways to tackle this but first I might ask a question on what additional data `pvconv' might provide when executed.<br><br>Please post the output of the following<br><br><textarea name="code" class="text" cols=50 rows=10>pvconv '-?'&#012;play '-?'&#012;</textarea><!--end code block--><br>I have `play' on my machine but I'd rather see what version you're using.<br><br>If `pvconv' can't tell us what file it created, we'll need to take a different tack (create a temporary subdirectory, unpack there, look for any .wav file and play it).<br><br>Please let me know.<br><br>Cheers,<br><br><small>--<br>pablo<br>openSUSE 10.3/KDE<br>ISP:  TekSavvy DSL; backhauled  via a 6KM wireless link</small>]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20456289</guid>
<pubDate>Fri, 09 May 2008 10:50:44 EDT</pubDate>
</item>

<item>
<title>Seeking help with bash command piping, redirection, e.g.</title>
<link>http://www.dslreports.com/forum/remark,20455982</link>
<description><![CDATA[<A HREF="/useremail/u/474027"><b>rolfp</b></A> : My treo phone creates voice memos that, when emailed as attachments, get formatted as a .qcp file.  Not finding a linux player that can deal with this, I did find a decoder/encoder program owned by QualComm[SCO?] that has worked fine, so far:<br>&raquo;<A HREF="http://www.qctconnect.com/downloads/purevoice/pvconv3_1.tar.gz" >www.qctconnect.com/downloads/pur&middot;&middot;&middot;1.tar.gz</A><br><textarea name="code" class="text" cols=50 rows=10>&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ ./pvconv 5-7-08\ 422\ pm.qcp&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  5-7-08 422 pm.wav  pvconv*&#012;&#91;rolf@localhost test&#93;$ play 5&#012;5-7-08 422 pm.qcp  5-7-08 422 pm.wav&#012;&#91;rolf@localhost test&#93;$ play 5-7-08\ 422\ pm.wav&#012; &#012;Input File     : '5-7-08 422 pm.wav'&#012;Sample Size    : 16-bit (2 bytes)&#012;Sample Encoding: signed (2's complement)&#012;Channels       : 1&#012;Sample Rate    : 8000&#012; &#012;Time: 00:12.28 &#91;00:00.00&#93; of 00:12.28 (100% ) Samples out: 98.2k Clips: 0&#012;Done.&#012;&#91;rolf@localhost test&#93;$&#012;</textarea><!--end code block--><br>It makes a .wav that plays nice and clear.  My dream is to create a one-line or script, even, that I'll try to have the browser (Seamonkey) call when such a .qcp file is encountered.  I've tried various combinations but cannot get it to go.  A short sampling:<br><br><textarea name="code" class="text" cols=50 rows=10>&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ ./pvconv 5-7-08\ 422\ pm.qcp; play -&#012;play soxio: Can't open input file `-': unknown file type&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  5-7-08 422 pm.wav  pvconv*&#012;&#91;rolf@localhost test&#93;$ rm -f 5-7-08\ 422\ pm.wav*&#012;&#91;rolf@localhost test&#93;$ play "./pvconv 5-7-08\ 422\ pm.qcp"&#012;play soxio: Can't open input file `./pvconv 5-7-08\ 422\ pm.qcp': No such file or directory&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$ ./pvconv 5-7-08\ 422\ pm.qcp &amp; play -&#012;&#91;1&#93; 6417&#012;play soxio: Can't open input file `-': unknown file type&#012;&#91;1&#93;+  Done                    ./pvconv 5-7-08\ 422\ pm.qcp&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  5-7-08 422 pm.wav  pvconv*&#012;&#91;rolf@localhost test&#93;$ rm -f 5-7-08\ 422\ pm.wav*&#012;&#91;rolf@localhost test&#93;$ play &lt; ./pvconv 5-7-08\ 422\ pm.qcp&#012;play soxio: Can't open input file `5-7-08 422 pm.qcp': unknown file type `qcp'&#012;&#91;rolf@localhost test&#93;$ ls&#012;5-7-08 422 pm.qcp  pvconv*&#012;&#91;rolf@localhost test&#93;$&#012;</textarea><!--end code block--><br>Can I get some guidance, please?]]></description>
<guid isPermaLink="true">http://www.dslreports.com/forum/remark,20455982</guid>
<pubDate>Fri, 09 May 2008 10:07:30 EDT</pubDate>
</item>

</channel>
</rss>
