hndwk
View Outline
convertって標準入力からできたっけ?
#!/bin/sh cd /home/*/Shell/photo/ set `date '+%Y-%m-%d-%H%M%S'` xwd > $@.xwd convert $@.xwd $@.png rm $@.xwd echo "Saving Complete! /home/*/Shell/cap/$@.png"
できるっぽい。tar と同じらしい。 こんな感じが使えそう。
#!/bin/sh datestr=`date '+%y%m%d%H%M%S'` hoststr=`hostname` outdir=/tmp dispstr="X" if [ "$DISPLAY" == ":0.0" ]; then dispstr="L" fi if [ "$DISPLAY" == ":0.1" ]; then dispstr="M" fi if [ "$DISPLAY" == ":0.2" ]; then dispstr="R" fi xwd -root | convert - ${outdir}/hc_${datestr}_${hoststr}_${dispstr}.png
Linux & Motif のコンパイル例
gcc -o msgbox msgbox.c -I/usr/X11R6/include -L/usr/X11R6/lib -lXm -lXt -lX11