由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - [转载] a question about shell script
相关主题
为什么我就是不会写Shell script?Shell Script
shell script for "for" loopHow to set environment variables for CGI scripts?
shell script questionhow to convert csh shell script to dos batch file
求助一个shell scripta question in shell script
[转载] 简单问题 -- about shell scriptHelp! shell programming
which shell is best?Shell Script Question about Hostname
shell programmingShell Script Question
where can I find some good website for C Shell ?Help on shell script
相关话题的讨论汇总
话题: lpc话题: shell话题: script话题: test话题: question
进入Unix版参与讨论
1 (共1页)
P***i
发帖数: 118
1
【 以下文字转载自 Linux 讨论区 】
【 原文由 pauli 所发表 】
I have a shell script
win.sh
lpc=1
while test $lpc -lt 3
do
awk -f ./tt $1 >./temp.log
TSA temp
lpc="expr $lpc + 1"
mv temp.log $1
done
but when I executed it, I got such an error:
$win chat
win:test: too many argument
Why? How to use cycle correctly in shell? Is it something wrong when I used "test"
B**z
发帖数: 153
2
1. while test "$lpc" -lt 3
2. lp=`expr $lpc +1`

【在 P***i 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 【 原文由 pauli 所发表 】
: I have a shell script
: win.sh
: lpc=1
: while test $lpc -lt 3
: do
: awk -f ./tt $1 >./temp.log
: TSA temp
: lpc="expr $lpc + 1"

1 (共1页)
进入Unix版参与讨论
相关主题
Help on shell script[转载] 简单问题 -- about shell script
[转载] Re: shell script questionwhich shell is best?
Korn shell scriptshell programming
help shell script (waiting on line)where can I find some good website for C Shell ?
为什么我就是不会写Shell script?Shell Script
shell script for "for" loopHow to set environment variables for CGI scripts?
shell script questionhow to convert csh shell script to dos batch file
求助一个shell scripta question in shell script
相关话题的讨论汇总
话题: lpc话题: shell话题: script话题: test话题: question