SHELL脚本基础

if [-f filename] 判断文件   ; if [-d dir] 判断目录 f [-r file] 判断文件是否可读 w 可写 x 可执行  z 是否为空

case 变量 in

for循环 do

echo -n 一行输出  -e 对\ 命令进行解释   t 使用tab空格

给某个变量设置多个值可以把值放在括号内,值与值之间用空格分隔。输出时默认是输出第一个值,如果要引用其中一个单独的数组元素,需要用代表它在数组中的位置的数值索引值。索引值要用方括号扩起来。0代表第一个数值,变量需要用{[]}的格式。

如果要全部输出,可以用通配符* 来实现。  如果想要改变其中某个值可以使用 变量[位置]=新值

使用unset可以删除其中某一个数值或者删除整个数组。

分享到:

60 条评论

昵称
  1. You have mentioned very interesting details ! ps nice site.

  2. Buy Gabapentin

    Have you ever thought about publishing an ebook or guest authoring on other sites? I have a blog centered on the same ideas you discuss and would really like to have you share some stories/information. I know my viewers would value your work. If you are even remotely interested, feel free to shoot me an email.

  3. Buy ADHD Relief

    Yay google is my king aided me to find this outstanding web site! .

  4. I together with my pals appeared to be digesting the best things located on the website then all of the sudden developed an awful feeling I had not expressed respect to the web site owner for them. These ladies came for this reason warmed to read through all of them and now have actually been tapping into these things. Many thanks for getting so thoughtful as well as for deciding on this sort of remarkable subjects most people are really needing to learn about. Our own honest apologies for not saying thanks to earlier.

  5. Some truly marvelous work on behalf of the owner of this website , utterly great content.

  6. Very interesting info !Perfect just what I was looking for! “The right to be heard does not autmatically include the right to be taken seriously.” by Hubert Humphrey.

  7. Hello my family member! I want to say that this post is amazing, great written and come with approximately all significant infos. I would like to look extra posts like this.

  8. Together with almost everything that seems to be developing throughout this subject material, a significant percentage of perspectives are quite stimulating. However, I appologize, but I can not subscribe to your whole idea, all be it stimulating none the less. It looks to us that your opinions are actually not totally validated and in actuality you are your self not really totally certain of the argument. In any case I did appreciate looking at it.

  9. steroide kaufen

    I went over this internet site and I think you have a lot of superb information, bookmarked (:.

  10. You are my breathing in, I have few blogs and rarely run out from to brand.

  11. Some really great articles on this website, thank you for contribution. “He that falls in love with himself will have no rivals.” by Benjamin Franklin.

  12. Everything is very open and very clear explanation of issues. was truly information. Your website is very useful. Thanks for sharing.

  13. Hey there, You’ve done an excellent job. I’ll certainly digg it and in my view suggest to my friends. I am sure they will be benefited from this website.

  14. I have been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is lovely price sufficient for me. In my view, if all webmasters and bloggers made just right content as you probably did, the internet will likely be a lot more useful than ever before.

  15. Hello there, You have done an excellent job. I’ll definitely digg it and personally recommend to my friends. I’m sure they will be benefited from this web site.

  16. Valuable information. Fortunate me I found your site accidentally, and I’m surprised why this coincidence didn’t happened earlier! I bookmarked it.

  17. steroide kaufen

    I cherished as much as you will obtain performed right here. The cartoon is attractive, your authored material stylish. nevertheless, you command get bought an nervousness over that you wish be delivering the following. in poor health indisputably come more until now once more as precisely the same just about very ceaselessly within case you protect this increase.

  18. reductil kaufen

    I am impressed with this site, rattling I am a fan.

  19. Oh my goodness! an amazing article dude. Thank you However I’m experiencing difficulty with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting equivalent rss drawback? Anybody who is aware of kindly respond. Thnkx

  20. It?¦s really a cool and useful piece of information. I am satisfied that you shared this useful information with us. Please stay us informed like this. Thanks for sharing.

  21. Hi, i feel that i noticed you visited my site thus i got here to “return the prefer”.I’m attempting to find issues to improve my web site!I guess its ok to make use of a few of your ideas!!

  22. Thank you for sharing with us, I conceive this website truly stands out : D.

  23. Magnificent website. Plenty of useful info here. I¦m sending it to some pals ans also sharing in delicious. And naturally, thanks to your sweat!

  24. I enjoy assembling utile information , this post has got me even more info! .

  25. look there

    Have you ever thought about publishing an ebook or guest authoring on other websites? I have a blog based upon on the same topics you discuss and would really like to have you share some stories/information. I know my readers would value your work. If you’re even remotely interested, feel free to send me an e-mail.

  26. this post

    Rattling great information can be found on website.

  27. Merely wanna input on few general things, The website style and design is perfect, the subject matter is really fantastic : D.

  28. visit homepage

    It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about! Thanks

  29. check here

    Good write-up, I’m normal visitor of one’s blog, maintain up the nice operate, and It is going to be a regular visitor for a lengthy time.

  30. As a Newbie, I am always searching online for articles that can be of assistance to me. Thank you