|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/share/doc/lynx-2.8.6/samples/ |
Upload File : |
#!/bin/sh # This script can be invoked as a wrapper for an external viewer by lynx, e.g., # given this line in lynx.cfg # XLOADIMAGE_COMMAND:keepviewer xli %s & # it will invoke xli on a hardlink to the file (which is assumed to be in the # temporary directory created by lynx), and clean up when the viewer exits. # # Parameters: # $1 is viewer # $2 is filename if test $# = 2 ; then chmod 600 $2 myfile=`echo $2 | sed -e 's@\(.*/tmp/\)\([^/]*/\)\?\(.*\)@\1my\3@'` ln $2 $myfile || exit 1 trap "rm -f $myfile" 0 1 2 5 15 eval $1 $myfile else echo "Usage: keepviewer <viewer> <filename>" exit 1 fi