奥宝gensis脚本培训(英文版).docx

上传人:王** 文档编号:786993 上传时间:2024-01-14 格式:DOCX 页数:68 大小:122.30KB
下载 相关 举报
奥宝gensis脚本培训(英文版).docx_第1页
第1页 / 共68页
奥宝gensis脚本培训(英文版).docx_第2页
第2页 / 共68页
奥宝gensis脚本培训(英文版).docx_第3页
第3页 / 共68页
奥宝gensis脚本培训(英文版).docx_第4页
第4页 / 共68页
奥宝gensis脚本培训(英文版).docx_第5页
第5页 / 共68页
奥宝gensis脚本培训(英文版).docx_第6页
第6页 / 共68页
奥宝gensis脚本培训(英文版).docx_第7页
第7页 / 共68页
奥宝gensis脚本培训(英文版).docx_第8页
第8页 / 共68页
奥宝gensis脚本培训(英文版).docx_第9页
第9页 / 共68页
奥宝gensis脚本培训(英文版).docx_第10页
第10页 / 共68页
亲,该文档总共68页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《奥宝gensis脚本培训(英文版).docx》由会员分享,可在线阅读,更多相关《奥宝gensis脚本培训(英文版).docx(68页珍藏版)》请在优知文库上搜索。

1、ProgramminginCshellThroughtheDemoandTraiCentre,Orbotechiscommittedtoofferingitscustomersthehighestqualityprofessionaltraining,whichprovidesthemostefficientandeconomicalsolutionstothechallengesofthePrintedCircuitBoardIndustry.SouthernChinaCommittedtoExcellence4B-4C,BlockC1ElectronicsScience&Technolog

2、yBldg.No.2070ShennanZhongRoadShenzhen518031Tel:(86)7553287800Fax:(86)7553287801DemozTrainingCentreSouthernChinaOrtxitechTechnology(Shenzhen)CompanyLtd.No.107-113,Block5A,InternationalCommerceCenterNo.1001HonghuaRoad,FutianFreeTradeZoneGuangzhouOfficeRoom1006-7l10F,EastTowerTianheEntertainmentPlaza62

3、1TianheRoadGuangzhou510630Tel:(86)20-8757-4616Fax:(86)20-8757-4620Tel:(86)75535951303595137NorthernChinaCommittedtoExcellenceFax:(86)7553595135DemoZTrainingCentreNorthernChinaShanghaiOffice1F,278ZhuJiangRoad(N)KunshanDevelopmentZoneKunshan1F,278ZhuJiangRoad(N)KunshanDevelopmentZoneKunshanRoom243,Xin

4、MaoBuilding,2TaiZhongRoad(三)WaigaoqiaoFreeTradeZone,Shanghai200131Tel:(86)520-735-7745Fax:(86)520-735-8628Tel:(86)520-735-7745Fax:(86)520-735-8628Tel:(86)21-5048-0555*4202Fax:(86)21-5048-0555-4202Cshismorethanasimplecommandlineprocessor.Itisalsoaprogramminglanguage.Youcanwriteprograms(calledscripts)

5、thatareexecutedbytheCShell.CONTENTSLCOmmandform琏音误!未定义书签。SingIeCOmmandlMUltiPleCommandS2COmmandGrOUPS3ConditionalCommandExecution4SUrnmary52IOredirectionandPiDeS音误!未定义书签。OUtPUtRedireCtionlAPPendingC)UtPUt2RedireCtingErrorC)UtPUl3SePanltingStandardOUtPUtandErrOrOUtPUt4TheBUilt-inNoClObberVariable5Red

6、ireCtingInPUt6COrmeCtingCommands:PiPeS7RedirectingStandardErrorThroughPipes9SummarylO3fWenameexpansion错误!未定义书签。FiIeIameEXPanSiOnMetaCharaCterSlMatChingFiIenameStringCOmPonentS2MatChingWithCharaCterSCIaSSeS3DeDVrdFilenameS4EscapeMechanisms5Summary641variableslSettingVaVabIeSlUsingShellVariables2Wordl

7、istVariables3VaVableSUbStitUtiOn4ReIeaSiagVariabIeS5TeStingifVariablesaseSet6PalhnamCVariableS7COmmandSUbStitUliOn8QUotiOgVariableS9ShellPreDefinedVariableslOSummaryl15,scriptslShellScriptslShelISCriCtS-EXamDleS2TheFOrmatOfShenSCriDtS3COmmentSinSheIISCriCtS4TheEChoCOmmand5ReadingDatafromtheTelTnina1

8、6PassingParameterstoShellProcedures7UsingArgv8TheShiflCommandloTheConditionalSlatemenl11ACaUIiOnOnUndefInedVariabIeS14TheEXECommand155.13SUmmary166.ExpreSSiolIEVaIUatk)IllEXDreSSiOnevaluationArithmetiCC)PeratorS2ReIatiOnalOPeratOrS3LOgiCalODeraIorS4OPeratOrPreCedenCe5FileInquiryOperators7SUmmary97Lu

9、odsandSWitCheSlTheForeaChStatementlTheWhveStatement2TheSWitChStatement3TheBreak&ContinUeStatement6theGotoStatement7SUmmary81. COMMANDFORMS11SlNGLECOMMANDTHEFoRNTATFoRASlNGLECOMMAND%command_nameargumentsNoTES1. command_nameisasimplenameoranyvalidpathname.2. argumentsmaybeaflag,apathnameorsomeotherspe

10、cialstring.3. Spacesand/ortabsalwaysseparatearguments.4. Akeystroketerminateseachcommandline.5. Youcanusetocontinuealongcommandtothenextline.EXAMPLESToprintthefullpathnameofyourcurrentworkingdirectory:%pwdTotypethestringHelloonourterminal:%echoHelloTocreatetwonewdirectoriesinyourcurrentdirectory:%mk

11、dirdir_ldir_2Tosearchthedirectoryhierarchystartingfromyourcurrentdirectoryforallthefilesnamedtest.dat,andtoprinttheirfullpathname:%find-nametest.dat-printNOTESIfyouliketogiveanargumentthathasablankinityoumustusequotesordoublequotes.EXAMPLES% prog New York % prog New Yorku % prog New Yorkoneargument=

12、NewYorkoneargument=NewYorktwoarguments;First=New,Second=York1.2MULTIPLECOMMANDSTheCShellallowsustoconcatenateseveralcommandsonasingleinputline.Asemicolonisusedtoseparatetheindividualcommands.THEFoRMATFoRMULTIPLECOMMANDS%command;command_2;command_nEXAMPLESTomakeanewdirectoryandtomakethatdirectorythew

13、ork_directory:%mkdirinformation;cdinformationGotoadirectoryandcompileaprogram,afterthatgototheroot:%cdsource;ccprogl.c;cd/NoTES TheC_Shellexecutescommand_1,Command_2,command_nsequentially. Eachcommandinthelistmayhavearguments. Usemultiplecommandswhenasetofcommandsformsalogicalgroup.1.3 COMMANDGROUPS

14、TheCShellallowsustotreatagroupofcommandsasasinglecommandandtorunthecommandgroupinasub_shell,preservingtheparentshellsenvironment.THEFORMATFoRACOMMANDGROUP%(cmd_l;cmd_2;.;cmd_n)EXAMPLESToillustrateacommandgroupinaction,consider:%(cdc_progs;ccprogl.c)Thiscommand(1)changesdirectories;(2)runsacompile;an

15、dthen(3)automaticallyreturnstoourparentshellandouroriginaldirectory.1.4 CONDITIONALCOMMANDEXECUTIONManyUNIXcommandsreturnstatusinformation.THECONVENTIONONormal(successful)exit.non-OAcommanderroroccurred.EXAMPLESTochecktheerrorstatusofacommand,usetheCShellvariablestatus:%echo$status1Inthiscase,Sstatus=1meansthatthefileprogl.cdoesntmatchthepatterngarfield.NoTES ACShellvariableisreferencedbyprefixingadollarsign(

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > IT计算机 > 数据结构与算法

copyright@ 2008-2023 yzwku网站版权所有

经营许可证编号:宁ICP备2022001189号-2

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!