ChinaUnix.net
相关文章推荐:

shell getopt example

by tangke 2009-09-07 这是同事写的两个shell script 1.update.sh #!/bin/bash set -e server="http://172.16.20.99/tmp" download_list=(Student rdesktop_loongson_1.0.3_mipsel.tar.gz static_ip.sh) echo "Download files..." for d in "${download_list[@]}" do rm -f "$d" wget "${server}/${d}" done . static_ip.sh echo "Install rdesktop_loongson..." tar xzpf rdesktop_loongson_1.0.3_mipsel.tar.gz -C / ec...

by fewlife - Linux文档专区 - 2009-09-07 16:45:41 阅读(582) 回复(0)

相关讨论

最近写脚本的时候遇到要使用getopt来检查命令行参数是否合法,下面是我的脚本[code] #!/bin/bash ARGS=`getopt -o ab:c:: -l a-long,b-long:,c-long:: -- "$@"` [ $? -ne 0 ] && usage [/code]可是在调用的时候我使用./test.sh --alon的时候它并没有提示错误,我用./test.sh --a-long-t的时候就会提示错误! 是不是getopt在解析的时候匹配不会精确匹配,有没有什么办法让它在./test.sh --alon的时候提示不认识这个选项?

by victorplus - Shell - 2012-07-29 14:26:17 阅读(3474) 回复(9)

example 2.7. 1 #!/bin/bash # GNU bash versions 2.x 2 # The Party Program––Invitations to friends from the "guest" file 3 guestfile=~/shell/guests 4 if [[ ! –e "$guestfile" ]] then 5 printf "${guestfile##*/} non–existent" exit 1 fi 6 export PLACE="Sarotini's" 7 (( Time=$(date +%H) + 1 )) 8 declare -a foods=(cheese crackers shrimp drinks `"hot dogs"` sand...

by liugao_0614 - Linux文档专区 - 2008-11-29 10:28:23 阅读(753) 回复(0)

LINUX与UNIX shell编程指南上的例子,在linux-bash下运行 代码如下 #!/bin/sh # getopt # modified getopt1 script # set the vars ...

by 科技牛 - Shell - 2007-07-27 10:09:04 阅读(3789) 回复(2)

perl有没有像linux shell by example那样的实例代码呢?

by anonyaniu - Perl - 2008-05-24 09:30:58 阅读(1752) 回复(3)

Small bulk INCAR System=bulk-GaAs DOS related values ISMEAR=-5 Electronic minimisation ENCUT=215 ! EMax for Ga !ENAUG=335.0 KPOINTS Monkhorst Pack 0 Monkhorst Pack 11 11 11 0 0 0 Supercell INCAR !ISPIN=2 DOS related values ISMEAR=0 SIGMA=0.05 Electronic minimisation NELECT=585 !chg 0 (neutral 585) NSW=30 IBRION=2 NELMIN = 4 EDIFF = 1E-4 EDIFFG = -0.05 ENCUT = 262 ! ENMIN for N LREAL = .TRUE. KPOIN...

by 冰海里的一条鱼 - Linux文档专区 - 2009-11-10 14:39:45 阅读(568) 回复(0)

Small bulk INCAR System=bulk-GaAs DOS related values ISMEAR=-5 Electronic minimisation ENCUT=215 ! EMax for Ga !ENAUG=335.0 KPOINTS Monkhorst Pack 0 Monkhorst Pack 11 11 11 0 0 0 Supercell INCAR !ISPIN=2 DOS related values ISMEAR=0 SIGMA=0.05 Electronic minimisation NELECT=585 !chg 0 (neutral 585) NSW=30 IBRION=2 NELMIN = 4 EDIFF = 1E-4 EDIFFG = -0.05 ENCUT = 262 ! ENMIN for N LREAL = .TRUE. KPOIN...

by 冰海里的一条鱼 - Linux文档专区 - 2009-11-10 14:39:42 阅读(571) 回复(0)

Struts example Struts is modeled after the MVC design pattern, you can follow a standard development process for all of your Struts Web applications. ...

by @sky - Java文档中心 - 2009-10-29 16:11:02 阅读(1090) 回复(0)

http://wiki.laptop.org/go/GStreamer#examples http://article.gmane.org/gmane.comp.video.gstreamer.devel/20240 附加: gst-launch v4l2src ! videorate ! video/x-raw-yuv,width=1280,height=1024 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! xvimagesink 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/66419/showart_2059373.html

by xw_max - Linux文档专区 - 2009-09-24 17:52:05 阅读(794) 回复(0)

Bash by example Summary: By learning how to program in the bash scripting language, your day-to-day interaction with Linux will become more fun and productive, and you'll be able to build upon those standard UNIX constructs (like pipelines and redirection) that you already know and love. In this three-part series, Daniel Robbins will teach you how to program in bash by example. He'll cover the...

by sunshareall0709 - Linux文档专区 - 2009-09-11 15:42:01 阅读(669) 回复(0)

#include sys/types.h> #include netinet/in.h> #include sys/event.h> #include sys/time.h> #include sys/socket.h> #include sys/types.h> #include arpa/inet.h> #include unistd.h> #include stdlib.h> #include string.h> #include stdio.h> #define err(msg) perror(msg) #define SA struct sockaddr struct event { int fd; void (*handle)(struct event *); }; static int tcp_listen(void) { ...

by @sky - BSD文档中心 - 2009-08-28 14:04:03 阅读(2212) 回复(0)