uspTukubaiコマンドに関する様々な資料がここにあります。

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

ABC順リスト |  カテゴリ別リスト

(動画教材準備中)

name-post

<概要>

name-post : name 形式ファイルを POST メソッド形式に変換し、
            指定シェルスクリプトを起動し、標準入力に接続する。

<書式>

Usage   : name-post <name_file> <shell_script>
Version : Thu Mar  6 18:33:27 JST 2014

<説明>

name-post は、指定 <name_file> を POST メソッド形式に変換し、指定シェ
ルスクリプトを起動し、標準入力に接続します。このとき、データ長を環境
変数 CONTENT_LENGTH にセットします。

name-post コマンドは、CGI スクリプトのデバッグに用いられます。

<例>

$ cat namefile
place 東京
country japan

$ cat table
place country population
東京  japan   10000000
大阪  japan    6000000

$ cat shellscript
#!/bin/sh
dd bs=$CONTENT_LENGTH  2>/dev/null     |
cgi-name                               |
tateyoko                               |
tagjoin0 key=place@country - table     |
mojihame -lLABEL html -                |
awk 'BEGIN{print "Content-type: text/html\n"}{print}'
exit 0

$ name-post namefile shellscript
Content-type: text/html

<html>
<table>
<tr>
<td>place</td><td>country</td><td>population</td>
<td>東京</td><td>japan< /td><td>10000000</td>
</tr>
</table>
</html>