为什么会这样,求解

sh/bash/dash/ksh/zsh等Shell脚本
回复
风随心动
帖子: 3
注册时间: 2008-09-05 8:53
送出感谢: 0
接收感谢: 0

为什么会这样,求解

#1

帖子 风随心动 » 2008-10-07 21:07

#!/bin/bash
declare raining="1"
while ["$raining" -eq "1"]
do
clear
echo ""
echo "is it raining?"
echo ""
echo "1.yes"
echo "2.no"
echo ""
echo "enter your selection"
read raining
done
echo "it stopped raining"
提示:./x.sh: line 3: [1:找不到命令
it stopped raining
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
送出感谢: 0
接收感谢: 3 次
联系:

Re: 为什么会这样,求解

#2

帖子 xiooli » 2008-10-07 21:10

[/]与其他的字母之间要有空格
lseeo
帖子: 8
注册时间: 2008-10-13 11:36
送出感谢: 0
接收感谢: 0

Re: 为什么会这样,求解

#3

帖子 lseeo » 2008-10-13 11:45

[是一个builtin
[[是一个keyword
风随心动
帖子: 3
注册时间: 2008-09-05 8:53
送出感谢: 0
接收感谢: 0

Re: 为什么会这样,求解

#4

帖子 风随心动 » 2008-10-22 0:45

liucao@liucao-laptop:~$ sudo lvcreate -L 36.36G -n liucaolv liucaovg
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.20 (2007-06-15)(compat) and kernel driver
striped: Required device-mapper target(s) not detected in your kernel
lvcreate: Create a logical volume
lvcreate
[-A|--autobackup {y|n}]
[--addtag Tag]
[--alloc AllocationPolicy]
[-C|--contiguous {y|n}]
[-d|--debug]
[-h|-?|--help]
[-i|--stripes Stripes [-I|--stripesize StripeSize]]
{-l|--extents LogicalExtentsNumber |
-L|--size LogicalVolumeSize[kKmMgGtTpPeE]}
[-M|--persistent {y|n}] [--major major] [--minor minor]
[-m|--mirrors Mirrors [--nosync] [--corelog]]
[-n|--name LogicalVolumeName]
[-p|--permission {r|rw}]
[-r|--readahead ReadAheadSectors]
[-R|--regionsize MirrorLogRegionSize]
[-t|--test]
[--type VolumeType]
[-v|--verbose]
[-Z|--zero {y|n}]
[--version]
VolumeGroupName [PhysicalVolumePath...]

lvcreate -s|--snapshot
[-c|--chunksize]
[-A|--autobackup {y|n}]
[--addtag Tag]
[--alloc AllocationPolicy]
[-C|--contiguous {y|n}]
[-d|--debug]
[-h|-?|--help]
[-i|--stripes Stripes [-I|--stripesize StripeSize]]
{-l|--extents LogicalExtentsNumber[%{VG|LV|FREE}] |
-L|--size LogicalVolumeSize[kKmMgGtTpPeE]}
[-M|--persistent {y|n}] [--major major] [--minor minor]
[-n|--name LogicalVolumeName]
[-p|--permission {r|rw}]
[-r|--readahead ReadAheadSectors]
[-t|--test]
[-v|--verbose]
[--version]
OriginalLogicalVolume[Path] [PhysicalVolumePath...]
每次用lvcreate命令就回到lvcreate命令的界面,这是怎么回事,
回复

回到 “Shell脚本”