csh实例 参考:
复制代码 代码如下:
#!/bin/csh -vx
#csh -vx show the command before running to help debug
#just to check syntax
#csh -n $0
#argv
if ($#argv < 2) then
echo "Sorry, but you entered too few parameters"
echo "usage: $0 arg1 arg2
exit
endif
set arg1 = $1
set arg2 = #2
foreach i ($*)
echo $i
end
#execute commands
echo "Hello there `whoami`. How are you today"
echo "You are currently using `hostname` and the time is `date`"
echo "Your directory is `pwd`"
whoami
hostname
date
pwd
#var
set name = Mark
echo $name
set name = "Mark Meyer" # if the string has space, must use ""
echo $name
# it means set to NULL
set name =
unset name
# get user input
set x = $<
set current_user = `whoami`
#buildin vars
echo $user # who am I"We found junk in file $1"
endif
# check if the var is defined
if ($"Grievous error! Database file does not exist".
endif
#foreach
foreach i (*)
if (-f $i) then
echo "============= $i ==================="
head $i
endif
if (-d $i) then
(cd $i; headers)
endif
end
#while
while ($#argv > 0)
grep $something $argv[1]
end
@ n = 5
while ($n)
# do something
@ n--
end
#switch-case
switch ($argv[$i])
case quit:
break # leave the switch statement
case list:
ls
breaksw
case delete:
case erase:
@ k = $i + 1
rm $argv[$k]
breaksw
endsw
#here document
grep $i <<HERE
John Doe 101 Surrey Lane London, UK 5E7 J2K
Angela Langsbury 99 Knightsbridge, Apt. K4 Liverpool
John Major 10 Downing Street London
HERE
cat > tempdata <<ENDOFDATA
53.3 94.3 67.1
48.3 01.3 99.9
42.1 48.6 92.8
ENDOFDATA
exit 0
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
- 刘德华.1999-人间爱【艺能动音】【WAV+CUE】
- 《蛋仔派对》敲锣猴子乔利皮肤图鉴
- 《蛋仔派对》二师兄皮肤图鉴
- 《蛋仔派对》发条鹦鹉巴洛皮肤图鉴
- 沈文程1988-畅销曲精华[爱莉亚][WAV+CUE]
- Brahms-ViolinConcerto,C.Schumann-3Romances-Batiashvili(2013)[96-24]
- Tchaikovsky-SymphonyNo.6-Nezet-Seguin,LisaBatiashvili(2014)[96-24].
- 《鸦卫奇旅》自定义是不是解锁不了难度
- 《海贼王赏金猎人》配置要求一览
- 《狗钩宇宙狗狗》联机失败解决方法
- 两款《宝可梦》国行版发售!售价299元 还有新外设
- 《塞尔达》新作常规通关20小时 全收集需30小时
- 腾讯Switch开启假日折扣!多款国产游戏迎史低
- 群星.1998-在那一年2CD【宝丽金】【WAV+CUE】
- 黄征.2012-征爱·拾力【乐华娱乐】【FLAC分轨】