BASH/C3/Advance-topics-in-a-function/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Paralok baieid, ngi pdiangsngewbha iaphi sha ka “spoken tutorial” halor ka “Advance topics in a function”.
00:08 Ha kane ka jinghikai, ngin ia pule ia ka:
00:11 “source” command ban buh ia ka function ha ka “background”
00:14 Da ka jingiarap jong katto katne ki nuksa.
00:18 Ban bud ia kane ka jinghikai, ngi dei ban don ia ka jingtip shaphang ka “Shell Scripting” ha “BASH.”
00:24 Lada phim don, na ka bynta ki jinghikai ba iadei, sngewbha leit sha ka website kumba la pyni. http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
00:30 Na ka bynta kane ka jinghikai, nga pyndonkam:
00:32 “Ubyntu Linux” 12.04 Operating System bad
00:36 GNU BASH version 4.2
00:40 Sngewbha kynmaw, ba ka “GNU Bash” version 4 lane kaba kham shajrong la ai jingmut na ka bynta kane ka jinghikai.
00:46 source command lah pyndonkam ban load ia ka file ha ka Shell script.
00:53 Ka read bad ka execute ia ki commands na ka file.
00:58 Ka import ruh ia u “code” hapoh jong ka “script”.
01:01 Kane kalong kaba iarap lada bun tylli ki scripts la pyndonkam na ka bynta ka common data lane “function library”.
01:09 Ka syntax na ka bynta ka “source” command kalong kumne harum-
01:12 source filename
01:15 source Path_to_file
01:18 souce filename arguments.
01:22 To ngan plie ia ka file 'function dot sh'.
01:26 Kane ka dei ka shebang line.
01:29 source detail dot sh kan load ia ka file detail dot sh hapoh kafunction dot sh.
01:37 To ngan plie ia ka file detail dot sh
01:41 Nga don ia ka “function” “machine”.
01:44 Mynta, type hapoh jong ka function-
01:47 echo "function machine is called in function dot sh file" .
01:52 Nion ha “Save”.
01:54 Mynta to ngin ia phai biang sha ka file function dot sh
01:59 Hangne, type: echo “Beginning of program”.
02:04 Nion ha “Save”.
02:06 Nangta type: machine echo “End of program”.
02:12 Kane kan print ia ka khubor “Beginning of program”.
02:16 machine kadei ka function call.
02:19 Bad kane kan sa print ia ka khubor End of program.
02:23 Kynmaw ba kane ka “machine” kadei ka “function” kaba ngi la shna ha ka file detail dot sh.
02:29 Bad ngi call ia kane ka “function”, hangne, ha ka file function dot sh.
02:34 Mynta nion ha “Save”.
02:36 To ngin ia “execute” ia ka program.
02:41 Te, type ha ka “terminal”: chmod space plus (+) x space function dot sh
02:51 Nion “Enter”.
02:53 Type: dot slash function dot sh
02:56 Nion “Enter.”
02:59 Ka “output” ka la paw.
03:02 Mynta to ngin ia leit sha ka background function.
03:06 Ban run ia ka process ha ka background, ngi pyndonkam ia u & (ampersand) ha kaba kut jong kafunction call.
03:13 ka shell ka forks ia ka child process ban run ia ka command.
03:19 Ka forked process kan don ia u job number bad u PID (Process Identifier).
03:27 To ngin ia pyrshang ban sngewthuh ia kane da ka jingiarap jong ka nuksa. Ngan plie ia ka file background dot sh.
03:35 Kane kadei ka shebang line.
03:38 Ka bg underscore function ka buh dak ia ka jingsdang jong ka function.
03:44 ka echo statement ka pyni ia ka khubor "Inside bg_function”.
03:50 Hadien kane, ngi ia pyndonkam ia ka “find” command ban wad ia baroh ki dot “mp3” files.
03:57 Kane ka statement kan it ia baroh ki files kiba don ia ka extension “dot mp3”.
04:03 Kan leh ia kane ha kane ka “working directory” ba mynta.
04:07 Hyphen iname la pyndonkam ban iaid lait ia kane ka kam.
04:11 Bad ia ka jingmih la buh ha ka myplaylist.txt.
04:16 Mynta, type: bg underscore function ampersand(&). Kane kadei ka function call. U '&'(Ampersand) u buh ia ka 'bg_function' ha ka background.
04:28 Mynta nion ha “Save”.
04:31 To ngin ia “execute” ia ka program.
04:34 Phai biang sha ka “terminal.”
04:37 Type: chmod space plus x space background dot sh
04:45 Nion Enter. Mynta, type: dot slash background dot sh
04:51 Nion “Enter.”
04:53 Ka jingmih kaba suda ka pynithuh ba ka “dot mp3” file kam don ha kane ka directory ba mynta.
05:02 Mynta, phai biang sha ka program jong ngi.
05:05 Type: echo (hyphen) -e "Process running in background are: backslash n" bad jobs space hyphen l
05:19 Nion ha “Save”.
05:21 Kane ka echo statement kan pyni ia ka khubor “Process running in background are ”.
05:28 jobs space hyphen l ka lis ia ka status jong baroh ki background jobs.
05:34 Mynta phai biang sha ka “terminal” jong ngi.
05:38 Mynta, type: dot slash background.sh.
05:42 Nion “Enter.”
05:44 Ka output la pyni.
05:48 Hangne, “one” hapoh jong ki square bracket ba plie bad ka khang udei u “job number.”
05:53 3962 udei u PID.
05:57 PID un pher katkum badei.
06:01 Lada ka “function” ka shimpor ban execute, kan sa run ia ka process ha ka background
06:06 Bad ngin sa iohi ia ka status kum “Running”.
06:11 Lada ka “function” ka la execute shwa ia ka script, ngin sa iohi ia ka status kum “Done”.
06:20 Ka “output” kan pher na kawei ka machine sha kawei pat.
06:23 Da kane ngi la poi sha kaba kut jong kane ka jinghikai.
06:28 To ngin batai kyllum. Ha kane ka jinghikai, ngi la pule ia ka:
06:32 Source command
06:34 Ban buh ia ka function ha ka “background”
06:36 Da ka jingiarap jong katto katne ki nuksa.
06:39 Kum ka kam na ka bynta jong phi: Thoh ia ka function “add” ban pyndap ar tylli ki number ban call ia function ha kawei pat ka file.
06:47 Peit ia ka video kaba don ha kane link kaba la ai harum http://spoken-tutorial.org/What_is_a_Spoken_Tutorial
06:51 Ka batai kyllum ia ka Spoken-Tutorial project.
06:55 Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien.
07:00 Ka kynhun jong ka Spoken Tutorial Project: Ka pynlong ia ki workshops da kaba pyndonkam ia ki spoken tutorials. Ka ai certificates sha kito kiba pass ha ka online test.
07:10 Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka contact@spoken-tutorial.org
07:18 Spoken Tutorial project kadei shi bynta jong ka Talk to a Teacher project.
07:22 La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India.
07:30 Kham bun ki jingtip halor kane ka mission kidon ha ka link ba la ai harum. http://spoken-tutorial.org/NMEICT-Intro
07:36 Ia kane ka script la noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial.
07:42 Nga dei i Meboreen na Shillong. Khublei shibun.

Contributors and Content Editors

Meboreen Mary