- 316 名前:login:Penguin mailto:sage [2008/07/02(水) 11:59:47 ID:t4E6Zbe3]
- >>302
#!/bin/sh st=true while read s do rctop=null rc=null for n in $s ;do if [ $st = true -a "$rctop" = "null" ] ;then rctop=user_name fi if [ "$rc" = "null" ] ;then rc=$n else if [ $st = true ] ;then rctopadd=`echo -n $n | cut -d '=' -f 1` rctop=`echo $rctop $rctopadd` fi rcadd=`echo -n $n | cut -d '=' -f 2` rc=`echo $rc $rcadd` fi done if [ $st = true ] ;then echo $rctop st=false fi echo $rc done $./shellscript.sh < n.data 理想の動作じゃないだろうが フォーマットをこっちが指定するやり方として…あとは整形の仕方だな
|

|