syspro-0405.ppt

Similar documents
I117 II I117 PROGRAMMING PRACTICE II SCRIPT LANGUAGE 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara

-2 gnuplot( ) j ( ) gnuplot /shell/myscript 1

unix15-script2_09.key

Read the following text messages. Study the names carefully. 次のメッセージを読みましょう 名前をしっかり覚えましょう Dear Jenny, Iʼm Kim Garcia. Iʼm your new classmate. These ar

シェルプログラミング コマンドをパイプでつなげるだけでは済まないような ある程度まとまった処理を複数のコマンドを制御構文を用いたりしてファイルとしたものを ( シェル ) スクリプトと呼ぶ シェルプログラム バッチなどともいう.bash_profile もシェルスクリプトなので このファイルを解読し

3


コンピュータ概論

K227 Java 2

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC

Asterisk PBX 不正利用防止

プレポスト【解説】

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

What s your name? Help me carry the baggage, please. politeness What s your name? Help me carry the baggage, please. iii

fx-9860G Manager PLUS_J

平成29年度英語力調査結果(中学3年生)の概要

PowerPoint Presentation

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

AN 100: ISPを使用するためのガイドライン

PowerPoint プレゼンテーション

UNIX

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

untitled

open / window / I / shall / the? something / want / drink / I / to the way / you / tell / the library / would / to / me


# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu

A

Java updated

Microsoft Word - Win-Outlook.docx

UNIX

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

C. S2 X D. E.. (1) X S1 10 S2 X+S1 3 X+S S1S2 X+S1+S2 X S1 X+S S X+S2 X A. S1 2 a. b. c. d. e. 2

tebiki00.dvi

unix.dvi

GNU Emacs GNU Emacs

X Window System X X &


西川町広報誌NETWORKにしかわ2011年1月号

<4D F736F F D208BB38DDE5F F4390B394C52E646F6378>

CM-3G 周辺モジュール拡張技術文書 INA226センサ(電流、電圧、電力)

( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( )

RR-US470 (RQCA1588).indd

Hi. Hello. My name is What s your name? Nice to meet you. How are you? I m OK. Good morning. How are you? I am fine, thank you. My name is. Nice to me

untitled

How to Use In-flight Wi-Fi service ご利用ガイド 3 Flight Plan will be available for international connecting flights within 24 hours. 3 フライトプランは24時間以内であれば 国際

# let st1 = {name = "Taro Yamada"; id = };; val st1 : student = {name="taro Yamada"; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n

PowerPoint プレゼンテーション

-2-

目次 1. レッスンで使える表現 レッスンでお困りの際に使えるフレーズからレッスンの中でよく使われるフレーズまで 便利な表現をご紹介させていただきます ご活用方法として 講師に伝えたいことが伝わらない場合に下記の通りご利用ください 1 該当の表現を直接講師に伝える 2 該当の英語表現を Skype



™…

Condition DAQ condition condition 2 3 XML key value

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

第10回 コーディングと統合(WWW用).PDF

Microsoft Word - D JP.docx

1 ( ) Level ################# #myls # ################ #!/bin/sh # if [ $# -eq 0 ] ; then pw=. elif [ $# -eq 1 ] ; then pw $1 else echo

A : kerl kerl Erlang/OTP Erlang/OTP 2 2 Elixir/Phoenix URL 2 PDF A.2 Bash macos.bash_profile exp

untitled

1 I EViews View Proc Freeze

超初心者用

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

Microsoft Word - Cygwin・ns2インストール.doc

Samba_HowTo.doc

dvi

4 $ alias elixirc="elixirc --ignore-module-conflict" warning redefining module User (current version loaded from Elixir.User.beam) user.ex1 User alias

haskell.gby

fiš„v3.dvi


〈論文〉興行データベースから「古典芸能」の定義を考える

L3 Japanese (90570) 2008

OWI(Oracle Wait Interface)の概要

untitled

h23w1.dvi

2. 投稿マニュアル.xlsm

ストラドプロシージャの呼び出し方

Oracle SolarisでQuest Authenticationを利用するためのSun ZFS Storage Applianceの構成方法

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

Answers Practice 08 JFD1

MOTIF XF 取扱説明書

デュアルウェア講習会課題 5 会津大学講習会 簡単な IoT を作成 2018 The University of Aizu

初心者用

LAN

Microsoft PowerPoint - 05Cobol.ppt

listings-ext

第16回ニュージェネレーション_cs4.indd

2.4.7 \ AWK AWK......

橡ソート手順比較

-2-


TeraTerm Pro V.2.32の利用法

2

DocuWide 2051/2051MF 補足説明書

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>

T rank A max{rank Q[R Q, J] t-rank T [R T, C \ J] J C} 2 ([1, p.138, Theorem 4.2.5]) A = ( ) Q rank A = min{ρ(j) γ(j) J J C} C, (5) ρ(j) = rank Q[R Q,

2009 No

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

第5回お試しアカウント付き並列プログラミング講習会

プリント

橡WINAPLI.PDF

Transcription:

3 4, 5 1

UNIX csh 2.1 bash X Window 2

grep l POSIX * more POSIX 3

UNIX. 4

first.sh #!bin/sh #first.sh #This file looks through all the files in the current #directory for the string yamada, and then prints those #files to the standard output. for file in * do if grep -q yamada $file then more $file fi done exit 0 /bin/sh first.sh 5

if, elif, for, while, until, case 6

FOO foo echo 7

bash-2.05$ salutation=hello bash-2.05$ echo $salutation bash-2.05$ salutation= Yes Dear bash-2.05$ echo $salutation bash-2.05$ salutation=7+5 bash-2.05$ echo $salutation 8

#!bin/sh myvar="hi there" echo $myvar echo "$myvar" echo '$myvar' echo \$myvar read echo Enter some text read myvar echo '$myvar' now equals $myvar exit 0 9

10

11

!/bin/sh salutation="hello" echo $salutation echo "The program $0 is now running" echo "The second parameter was $2" echo "The first parameter was $1" echo "The parameter list was $*" echo "The user's home directory is $HOME" echo "Please enter a new greeting" read salutation echo $salutation echo "The script is now complete" exit 0 12

test( [ ] ) [ ] test test if test -f fred.c then fi [ -f fred.c ] 13

test test.sh #!/bin/sh if test -f fred.c then echo "File fred.c exists." else echo "File fred.c not found." fi exit 0 14

test 15

if if condition then statements else statements fi 16

if if1.sh #!/bin/sh echo "Is it morning? Please answer yes or no" read timeofday if [ $timeofday = "yes" ]; then echo "Good morning" else echo "Good afternoon" fi exit 0 17

If if2.sh!/bin/sh echo "Is it morning? Please answer yes or no" read timeofday if [ $timeofday = "yes" ]; then echo "Good morning" elif [ $timeofday = "no" ]; then echo "Good afternoon" else echo "Sorry, $timeofday not recognized. Enter yes or no" exit 1 fi exit 0 18

If 3 if3.sh!/bin/sh echo "Is it morning? Please answer yes or no" read timeofday if [ $timeofday = "yes" ]; then echo "Good morning" elif [ $timeofday = "no" ]; then echo "Good afternoon" else echo "Sorry, $timeofday not recognized. Enter yes or no" exit 1 fi exit 0 19

for, while, case C for for variable in values do statements done 20

for 1 for1.sh #!bin/sh/ for name in aoki tokunaga ohzeki 43 do echo $name done exit 0 21

for for2.sh #!bin/sh/ for file in $(ls *.c); do echo $file done exit 0 22

While for 10 #!/bin/sh for foo in 1 2 3 4 5 6 7 8 9 10 do echo "here we go again" done exit 0 23

While while while condition do statements done 24

while while1.sh #!bin/sh echo "Enter your password" read trythis while [ "$trythis"!= "secret" ] do echo "Sorry, try again" read trythis done echo "Login succeeded." exit 0 25

while2.sh #!/bin/sh i=1 while while [ "$i" -le 10 ] do echo "Loop number : $i" i=$(($i+1)) done exit 0 26

case case case variable in pattern pattern. ) statements1;; pattern pattern. ) statements2;;.. esac 27

case case1.sh 28

case case2.sh 29

case case3.sh 30

*.txt 31

And Or AND statement1 && statement2 && statement3 false Or statement1 statement2 statement3 true 32

And Or 33

function_name( ){ statements } #!bin/sh func1.sh foo(){ echo "Function foo is executing" } echo "script starting" foo echo "script ended" exit 0 34

35

36

http://www.not-enough.org/abe/manual/unix2-ad99/array.html 37

[filename] % /bin/sh judge.sh [filename] "WARNING! No such file [filename]" "Enter Filename: " % /bin/sh judge.sh Wrong number of arguments. Usage /bin/sh judge.sh filename 38

Enter filename: datafile.txt Enter keyword: Aoki Yoshimitsu Aoki C *.c *.c.bak 39

*.c C source file *.sh Shell script file *.txt Text file else 40