BASH/C3/More-on-functions/Khasi
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Ngi pdiangsngewbha iaphi sha ka “spoken tutorial” halor ka “More on functions.” |
00:06 | Ha kane ka jinghikai, ngin ia pule kumno ban: |
00:09 | Ban pass ia ka “argument” sha ka “function”” |
00:11 | Ban define ia ka “local variable” hapoh ka “function” bad |
00:16 | Ban define ia ka “global variable” ha ka “function” |
00:19 | Da ka jingiarap jong ki katto katne ki nuksa. |
00:23 | Ban bud ia kane ka jinghikai, phi dei ban don ia ka jingtip jong ka “Shell Scripting” ha ka “BASH.” |
00:28 | Lada phim tip, na ka bynta ki jinghikai ba iadei, sngewbha leit sha ka website jong ngi kumba la pyni: (http://www.spoken-tutorial.org) |
00:35 | Na ka bynta kane ka jinghikai, nga pyndonkam da ka: |
00:37 | Ubuntu Linux 12.04 Operating System bad |
00:42 | GNU BASH version 4.2. |
00:45 | Sngewbha kynmaw, ka “GNU Bash” version 4 lane kaba kham shajrong lah ai jingmut na ka bynta kane ka jinghikai. |
00:52 | To ngin ia pule shwa nyngkong kumno ban pass ia ka “argument” sha ka “function” bad ka jingdonkam jong ka. |
00:59 | To ngan plie ia ka file 'function_(underscore) parameters.sh' . |
01:05 | Kane kadei ka “shebang line.” |
01:08 | Ka kyrteng jong ka “function” kadei say_(underscore)welcome. |
01:13 | Open curly bracket ka plie ia ka “function” definition. |
01:18 | '$1' (Dollar one) kadei ka positional parameter ba nyngkong. |
01:22 | '$2' (Dollar two) kadei ka positional parameter ba ar. |
01:26 | Close curly bracket ka khang ia ka “function definition”. |
01:30 | Hangne, ka function 'say_welcome' la call bad ki arguments. |
01:35 | Ka syntax kadei- ka kyrteng jong kafunction kata "say_welcome" bud da ki arguments hapoh double quotes, kata "Bash" bad "learning". |
01:49 | Ha kajuh ka rukom, ngan sa “call” ia kajuh ka “function” ryngkat ki set bapher bapher jong ki “arguments”. Te, nga don ia ka “say_welcome” space hapoh ki double quotes “functions in” space hapoh double quotes “Bash”. |
02:05 | “Save” ia ka file bad leit sha ka “terminal”. |
02:08 | Type: chmod space plus x space function underscore parameters dot sh. |
02:17 | Nion “Enter.” |
02:19 | Type: dot slash function underscore parameters dot sh. |
02:26 | Nion “Enter.” |
02:28 | Ngi iohi ba ki positional parameters lah bujli da ki arguments ba lah pass sha ka function. |
02:36 | Dollar 1 ($1) lah bujli da ka string "Bash" bad Dollar 2 ($2) da ka "learning". |
02:45 | Nangta sa shisien, Dollar 1 ($1) lah bujli da ka "functions in" bad Dollar 2 ($2) da ka "Bash". |
02:55 | Ha ka “Bash”, “variable” lah ban declare kum ki “local variables” bad “global variables.” |
03:01 | Local variable: |
03:03 | Ki value jong ka kin long valid hapoh ka “function” ha kaba lah define ia ka. |
03:10 | Local variables lah declare da ka keyword local. |
03:15 | Global variable: |
03:17 | Ka value jong ka “global variable” lah ban access ha baroh kawei ka “Bash script”. |
03:24 | To ngin ia pule ia kine 2 tylli ki rukom ban declare ia ka “variable” hapoh ka “function.” |
03:29 | To ngan plie ia ka file kaba kyrteng ka 'function_(underscore)local.sh'. |
03:35 | Kane kadei ka “shebang line.” |
03:39 | Ka kyrteng jong ka Function kadei say_(underscore) hello. |
03:43 | Hangne, ka variable first_name lah pynithuh da ka keyword local |
03:49 | Kaba mut ba ka value kan long valid tang hapoh ka function “say_hello”. |
03:55 | Ka “variable” kaba la pynithuh khlem kano kano ka keyword la khein kum ka “global variable”. |
04:01 | Te, ka variable “last_name” lah ban access ha baroh kawei ka “script”. |
04:08 | Ha kane ka “echo” line, ngin ia pyni ia ka value jong ki variables |
04:12 | first_name, |
04:14 | middle_name bad last_name. |
04:17 | Hadien kane, ngi khang ia ka “function.” |
04:21 | Mynta, hangne, ka variable middle_name lah declare khlem u keyword. Te, ka value kan dei global ha baroh kawei ka script. |
04:30 | Sa shisien, ngin “call” ia ka “function” hangne. |
04:34 | Ngi pass ia ar tylli ki “arguments” ha kane ka “function call” kaba kyrteng- “Pratik” bad “Patil”. |
04:41 | Kine ki “echo” statements kin sa pyni ia ka value jong ki “variables” |
04:45 | $first_name, '$middle_name bad $last_name'. |
04:51 | Sngewbha buh jingmut ba ka variable “first_name” kadei ka “local variable.” |
04:57 | “Save” ia ka file bad leit sha ka “terminal.” |
05:00 | Type: chmod space plus x space function underscore local dot sh. |
05:09 | Nion “Enter.” |
05:11 | Type: dot slash function underscore local dot sh |
05:16 | Nion “Enter.” |
05:18 | Ka lain ba nyngkong jong ka output ka pyni ia ka khubor "Hello Pratik K Patil". |
05:25 | Hangne, ka variable “first_name” kaba don ia u value “Pratik” kadei “local” |
05:31 | Kaba mut ba u value u long pyrkhing ha ka “function”. |
05:35 | Mynta, to ngin peit kumno ka “local variable” kalong shabar jong ka “function”. |
05:41 | Hangne, khlem pyni eiei ha ka “first_name.” |
05:44 | Kane kadei namar ba ka value jong ka “first_name” kadei “local” ha ka “function”. Bad kam don shabar jong ka “function”. |
05:53 | “middle_name” bad “last_name” la print namar ba kidei ki “global variables.” |
05:59 | Kyrmen ba ka jingiapher hapdeng kine ka lah shai ia phi. |
06:02 | To mynta ngin ia batai kyllum. |
06:04 | Ha kane ka jinghikai, ngi la pule kumno ban: |
06:07 | Pass ia ki “arguments” sha ka “function”
Ban declare ia ka “local variable” ha ka “function”. |
06:14 | Ban declare ia ka “global variable” ha ka “function” da ka jingiarap jong katto katne ki nuksa. |
06:20 | Kum ka kam na ka bynta jong phi- |
06:22 | Thoh ia ka program ha kaba ka “function” ka pdiang ia ar tylli ki “arguments”. Ka “function” kadei ban multiply ia ki ar tylli ki “arguments”. |
06:31 | Pynlong 3 tylli ki “function calls” bad “argument” (1, 2), (2, 3) bad (3, 4). |
06:39 | Peit ia ka video kaba don ha ka link ba la ai harum. |
06:43 | Ka kyllum lang ia ka Spoken-Tutorial project. Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien. |
06:51 | Ka kynhun jong ka Spoken Tutorial project:
Ka pynlong ia ki workshops da kaba pyndonkam da ki spoken tutorials; Ka ai certificates sha kito kiba pass ha ka online test. |
07:00 | Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka contact@spoken-tutorial.org |
07:07 | Spoken Tutorial project kadei shi bynta jong ka Talk to a Teacher project. |
07:11 | La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India. Kham bun ki jingtip halor kane ka mission kidon ha ka: http://spoken-tutorial.org/NMEICT-Intro |
07:26 | Ia kane ka script la noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial. |
07:31 | Ma nga i Meboreen na Shillong nga pynkut ia kane. Khublei shibun. |