C-shell Scripting - Cheatsheet

  • Uploaded by: MEG
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View C-shell Scripting - Cheatsheet as PDF for free.

More details

  • Words: 101
  • Pages: 1
C-Shell Scripting (Cheat Sheet) Comments # one line comment

Variables # declaration set variable # initialization set variable = value # print variable's value echo $variable

Arrays # initialization set array = (value1 value2 .. valuen) # print item's value echo $array[index]

If Statement if (expression1) commands else if (expression2) commands else commands endif

GoTo Statement goto label commands label: commands

Repeat Statement repeat number command

Foreach Statement foreach array (variable) commands end

Switch Statement switch (expression) case pattern1: commands breaksw case pattern2: commands breaksw default: commands endsw

While Statement while (expression) commands end

Hello Word Script #/bin/csh $echo “hello world!”

Related Documents

Cheatsheet
May 2020 31
Cheatsheet
December 2019 51
Cheatsheet
December 2019 51
Cheatsheet
May 2020 25
Cheatsheet
July 2019 58

More Documents from ""

London Streets
April 2020 10
List
May 2020 12
New Moon Fanfiction
May 2020 14
Starbursting.pdf
December 2019 8
June 2020 0