BASH/C2/Arithmetic-Comparison/Khasi

From Script | Spoken-Tutorial
Revision as of 18:22, 13 June 2017 by Meboreen Mary (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Time Narration
00:01 Khublei ngi pdiangsngewbha ia phi sha ka spoken tutorialhalor ka Arithmetic Comparison haBASH.
00:07 Ha kane ka jinghikai , ngin pule shaphang :
equal to (-eq) not equal to (-ne)
00:12 less than (-lt)'less than equal to (-le)'
00:15 greater than (-gt) badgreater than equal to (-ge) commands.
00:19 Ngin leh ia kane da ka jingiarap ki katto katne ki nuksa.
00:23 Na ka bynta kane ka jinghikai, nga pyndonkam
00:26 Ubuntu Linux 12.04 Operating System
00:30 GNU BASH version 4.1.10
00:34 Ka GNU Bash version 4 lane kiba kham shajrong la ai jingmut na ka bynta ka jinghikai
00:39 Nga la don lypa ia ki nuksa jong ki arithmetic operators.
00:43 To ngan phai sha ka.
00:45 Nga la jer kyrteng ia ka fileexample1.sh.
00:50 Plie ia ka file ha kano kano ka editor katkum ka jingkwah jong phi bad type ia u code kumba la pyni.
00:56 Phi la tip bha kumno ban leh ia kane, mynta
01:00 Ha kane ka program, ngin check la ka file ba la ai ka don eiei ne em.
01:06 To ngan batai ia u code.
01:08 Kane kadei ka shebang line.
01:10 Nyngkong eh, “Enter filename” kan sa print ha ka console.
01:15 read command ka pule ia kawei ka lain jong ka data na ka standard input.
01:20 Kane ka command ka don hapoh ki backticks.
01:24 Backtick kadon ia ka jingmut bapher bha.
01:27 Kat kaba phi type hapdeng ki backtick la khein lang
01:32 cat command kan pyni ia ka content jong ka file.
01:37 wc kan print newline, ka khein ia ka word bad byte na ka bynta man kawei pa kawei ka file
01:43 - (hyphen) w kan print ia ka word count.
01:47 Kaei kaban jia kadei
01:49 Nyngkong , ka cat kan read ia ka file
01:53 Kane kadei ka input file
01:55 Kaban sa piped lane phah sha ka wc command.
02:00 Te , kane ka statement ka niew ia ki kyntien ha ka file ba la ai.
02:05 Ka output la buh ha u variable x.
02:08 Kane kadei ka if statement.
02:10 - (hyphen) eq command ka check la ka word count ka dei zero ne em.
02:16 Lada ka condition kadei True, ngin print ia ka khubor "File has zero words”.
02:22 "fi" kadei ka jingkut jong ka if condition ba nyngkong.
02:26 Kane kadei sa kawei ka if condition.
02:28 Hangne, - (hyphen) ne command ka check la ka word count kam dei zero.
02:35 Lada ka condition kadei True, ngin print“File has so-and-so words”.
02:40 $x (dollar x) kan ai ia ka word count.
02:43 Kane kadei kaba kut jong ka if condition kaba ar.
02:46 Save ia ka program file jong phi.
02:48 To ngin execute ia ka program jong ngi.
02:51 Plie ia ka terminal.
02:53 Nyngkong to ngin shna ia ka file list.txt.
02:57 Type: touch list.txt.
03:01 Mynta to ngin pyndap kawei ka lain ha ka file
03:04 Type:

echo hapoh double quotes “How are you” hadien ki double quotes greater than sign list.txt.

03:13 Mynta , to ngin pynlong ia ka script jong ngi executable.
03:16 Type:

chmod plus x example1 dot sh

03:21 Mynta , type: dot slash example1.sh
03:26 "Enter filename:" ka paw
03:28 Type: list.txt
03:31 Ka output ka paw kum : "list.txt has 3 words".
03:36 Mynta to ngin pule shaphang kawei pat ka set jong ki operators.
03:40 To ngan phai sha kawei ka file
03:43 Kane kadei example2.sh .
03:46 Sngewbha plié ia ka file ha ka editor jong phi bad jer kyrteng ia ka kum "example2.sh".
03:52 Mynta type ia u code kumba la pyni hangne , ha ka "example2.sh" file jong phi.
03:58 To ngan batai ia u code.
04:00 Kane ka program kan check lada ka word count kadei
04:04 Kham heh lane rit ban ia u wei
04:07 Hapdeng one bad hundred lane hundred shajrong.
04:11 Ngi don ia ka shebang line jong ngi hangne.
04:14 read statement ka shim ia ka filename kum ka input na u user.
04:19 Hangne, - (hyphen) c la ju pyndonkam ban print ia ka byte counts.
04:24 Ha ka if statement, - (hyphen) lt command ka check lada ka word count ka duna ban ia one
04:31 Lada ka condition kadei True te ngi print“No characters present in the file”.
04:37 "fi" ka pynkut ia ka if condition.
04:40 Ka if statement kaba bud kadon ia ka nested if statement.
04:45 Nyngkong, - (hyphen) gt command ka check lada ka word count ka heh ban ia one
04:51 Lada kadei 'yes' te kane ka echo statement kan sa execute.
04:56 Don shibun ki conditions hapoh jong ka if statement.
05:01 Hangne, ha kane ka if:

- (hyphen) ge command ka check lada ka word count ka heh ban ia one lane kadei one bad

05:09 - (hyphen) le command ka check lada ka word count ka rit ban ia hundred lane kadei hundred.
05:17 Lada baroh artylli ki conditions ki iahap, te ka print
05:21 "Number of characters ranges between 1 and 100".
05:25 Sngew bha kynmaw ba baroh artylli ki conditions kidei ban dei True ban iahap bad baroh kawei ka if condition.
05:33 Kane kadei namar ngi la kynthup lang ia u ampersand hapdeng baroh artylli ki conditions
05:39 "fi" kadei kaba kut jong ka if statement.
05:43 Te ka if statement kaba bud kan sa shah evaluate.
05:47 - (hyphen) gt command ka check lada ka word count ka heh ban ia hundred.
05:53 Lada ka condition ka dei, ngi print "Number of characters is above hundred".
06:00 "fi" kadei kaba kut jong kaif statement.
06:04 Hangne ngi pynkut ia ka if statement kaba ar.
06:07 Mynta phai biang sha ka terminal jong ngi.
06:10 To ngin execute ia ka program
06:13 chmod plus x example2 dot sh
06:18 dot slash example2 dot sh
06:22 Type list.txt .
06:25 Ka output ka pyni kum "list.txt has more than one character".
06:31 "Number of characters ranges between one and hundred".
06:36 Mynta , pyndap lane weng ia ki characters sha ka list.txt file.
06:40 Bad sa peit kano ka if statement kaba shah execute.
06:46 Bad da kane ngi la poi sha kaba kut jong kane ka jinghikai.
06:49 To ngin batai kyllum.
06:51 Ha kane ka jinghikai ngi la pule :

equal to not equal to less than less than equal to greater than bad greater than equal to commands.

07:03 Kum ka kam na ka bynta jong phi, thoh ia ka program ban batai ia ka jingdonkam jong u not equal to operator.
07:09 Hint: - (hyphen) ne.
07:12 Peit ia ka video ba don ha ka link ba la ai harum
07:15 Ka batai kyllum ia ka Spoken-Tutorial project.
07:18 Lada phim don ia ka bandwidth kaba biang , phi lah ban shu download bad peit ia ka .
07:23 Ka kynhun jong ka Spoken-Tutorial Project:
07:25 Ka pynlong ia ki workshops da kaba pyndonkam da ki spoken tutorials
07:28 Ka ai sertiphikate sha kito kiba pass ha ka online test.
07:32 Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka contact@spoken-tutorial.org
07:40 Spoken Tutorial Projek kadei shibynta jong ka "Talk to a Teacher" projek.
07:43 La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India.
07:51 Kham bun ki jingtip halor kane ka mission kidon ha ka link ba la ai harum http://spoken-tutorial.org/NMEICT-Intro
07:56 Kane ka script la noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial .
08:02 Bad nga I Meboreen na Shillong , nga pynkut ia kane.
08:06 Khublei shibun ia ka jingsnohkti lang jong phi.

Contributors and Content Editors

Meboreen Mary