NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [ldm-users] understanding the PIPE action

Hi Jeff,

On Sun, 7 Jun 2009, Jeffrey Lake - Admin wrote:

I am attempting to get a hold of the PIPE action in LDM.
here is what I have as a test in my pqact.conf
------------------------------------------
#TEST
DDPLUS[tab] ^.*/pSVR
[tab]PIPE[tab]decoders/test.sh
-----------------------------------------
and the test.sh script
----------------------------------------------
#!/bin/sh
php /usr/local/ldm/decoders/test.php "$1"
----------------------------------------------

LDM pipes the product over STDIN for the script and works much like how the UNIX pipe command (|) works. You can test this outside of LDM by simply doing so:

cat SVR.txt | php test.php SVR

I have never read stdin with PHP, so perhaps you can use your shell script wrapper to help out.

#!/bin/sh

# Place STDIN into this file
cat > /tmp/tmpfile.$$
php /usr/local/ldm/decoders/test.php "$1" "/tmp/tmpfile.$$"

daryl

--
/**
 * Daryl Herzmann
 * Assistant Scientist -- Iowa Environmental Mesonet
 * http://mesonet.agron.iastate.edu
 */



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the ldm-users archives: