BASH/C3/Here-document-and-Here-string/Khasi
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Paralok, ngi pdiang sngewbha iaphi sha ka spoken tutorial halor ka HERE document and strings. |
00:08 | Ha kane ka jinghikai, ngin ia pule shaphang |
00:11 | Ka special-purpose redirection kaba la khot ka Here documents bad Here strings |
00:17 | Da ka jingiarap jong katto katne ki nuksa. |
00:20 | Ban bud ia kane ka jinghikai, phi dei ban don ka jingtip shaphang ka Shell Scripting ha ka BASH. |
00:26 | Lada phim don, te na ka bynta ki jinghikai ba iadei, sngewbha leit sha ka website jong ngi kumba la pyni. Shell Scripting in BASH. |
00:32 | Na ka bynta kane ka jinghikai, nga pyndonkam da ka: |
00:34 | Ubuntu Linux 12.04 Operating System |
00:39 | GNU BASH version 4.2 |
00:42 | Sngewbha kynmaw, GNU Bash version 4 lane kaba kham shajrong lah ai jingmut na ka bynta kane ka jinghikai. |
00:49 | To ngin ia pule shaphang ka 'Here' document. |
00:52 | Kadei ka block ba la thmu kyrpang jong ka text lane code. |
00:56 | Kadei ka jait jong ka I/O redirect. |
01:00 | Ka ai ia ki lis jong ki command sha ka interactive program lane ka command line. |
01:06 | Lah ban shim ia ka kum kawei pat ka file. |
01:10 | Lah ruh ban shim ia ka kum ka multiple line input kaba la redirect sha ka shell script. |
01:17 | Ka Syntax kadei-command space less than less than space HERE. |
01:24 | Hadien kane, ha ka line kaba bud, ngi lah ban ai ia ka text inputs. |
01:29 | Ka lah ban don ia uno uno u number jong ki lines. |
01:33 | Hangne, text1, text2, textN kidei ki text inputs. |
01:40 | Hadien jong u text inputs, ha u line uba bud, ngi type ia u keyword HERE sa shisien. |
01:46 | U pynithuh ia ka jingkut jong ka HERE document. |
01:50 | To ngin ia pyrshang ban sngewthuh ia kane da ka nuksa. |
01:53 | Ngan plie ia ka file kaba kyrteng here dot sh . |
01:59 | Ka line kaba nyngkong jong u code kadei ka shebang line. |
02:04 | To ngan buh ia u block jong u code hadien une u line. |
02:09 | 'wc' u ieng ha ka jaka word count. |
02:12 | wc hyphen w u khein ia ki number jong ki kyntien ha ka HERE document. |
02:20 | U block jong u code lane text haduh ka sien ba ar ba u HERE u don la khein kum ka file. |
02:28 | Ka content kaba don ha ka HERE document kadei ka input sha ka command wc hyphen w. |
02:36 | HERE u long kum u delimiter na ka bynta ka wc hyphen w command katba ka dang read ia u multi-line input. |
02:47 | Lada ngi pyrshang ban execute ia kajuh ka command ha ka terminal, ngi dei ban ioh '4' kum ka output. |
02:55 | Kane kadei namar ba ngi lah pass saw kyntien sha ka command wc hyphen w. |
03:03 | Mynta nion ha Save ban save ia ka file. |
03:06 | To ngin phai sha ka Terminal da kaba pyndonkam ia u Ctrl, Alt bad T keys ha kajuh kapor na ka keyboard jong phi. |
03:15 | Type: chmod space plus x space here dot sh |
03:22 | Shon Enter. |
03:24 | Type: dot slash here dot sh |
03:27 | Shon Enter. |
03:30 | Ngi lah ban iohi ia ka output kum 4 |
03:33 | Kata kadei, ki number jong ki kyntien ha ka 'Here' document kadei 4. |
03:38 | Phai biang sha ka program jong ngi. |
03:41 | To ngin ia pyndap shuh sa ar tylli ki kyntien hangne, ha kaba sdang jong ka text. |
03:47 | Hello and welcome to Bash learning. |
03:52 | Nion ha Save. |
03:54 | To ngin ia execute ia ka program sa shisien. |
03:57 | Ha ka terminal, type: dot slash here dot sh |
04:04 | Shon Enter. |
04:06 | Mynta ka output kadei 6 namar ngi lah pyndap ar tylli ki kyntien ha ka text jong ngi. |
04:13 | Ngi lah ruh ban pass ia ka argument sha ka document Here. |
04:18 | To ngin ia peit kumno ban leh ia kane da ka nuksa. |
04:22 | To ngan plie ia ka file kaba kyrteng ka hereoutput dot sh. |
04:28 | Ka command cat kan sa concatenate ia ki file bad print ia ka standard output. |
04:35 | Kynmaw ba ngi lah pyndonkam ia u string "this" ha ka jaka jong u "HERE". |
04:41 | Kam dei kaba donkam ba man kapor phin hap pyndonkam ia u delimiter HERE. |
04:47 | Phi lah ban pyndonkam ia uno uno u delimiter ruh. |
04:51 | Kane ka line kan sa pynmih ia u 0th (zeroth) argument. |
04:55 | Ka 0th (zeroth) argument, da kaba long hi, kadei ka filename. |
05:00 | Kane ka line kan sa pynmih ia u 1st argument ba lah passed sha ka program. |
05:05 | Bad kane ka line kan sa pynmih ia u 2nd argument ba lah pass sha ka program. |
05:09 | Hangne ngi hap ban khang ia ka document da kaba pyndonkam ia ujuh u delimiter this. |
05:17 | Save ia ka file. To mynta ngin ia execute ia ka program. |
05:21 | Ha ka terminal, type: chmod space plus x space hereoutput dot sh. |
05:29 | Shon Enter |
05:32 | Type: dot slash hereoutput dot sh space Sunday space Monday |
05:40 | Ka output ka paw kum: |
05:43 | "0'th argument is: dot slash hereoutput dot sh" kaba dei ka filename. |
05:49 | "1st argument is: Sunday" |
05:51 | "2nd argument is: Monday" . |
05:55 | To mynta ngin ia pule shaphang ka "Here" string. |
05:59 | Here string la pyndonkam na ka bynta ka input redirection na ka text lane ka variable. |
06:06 | Ka input lah batai ha kajuh ka line hapoh ki single quotes. |
06:12 | Ka syntax kadei- command space three 'less than symbols' space hapoh ki single quotes thoh string |
06:22 | To ngin ia pyrshang ban sngewthuh ia kane da ka nuksa. |
06:25 | Ngan plie ia kajuh ka file here dot sh. |
06:30 | Hangne ha kaba kut, ngan type: wc space hyphen w three less than symbols space hapoh single quotes Welcome to Bash learning. |
06:44 | Kane kan sa redirect ia u string hapoh ki quotes sha ka command wc hyphen w. |
06:52 | Mynta nion ha Save ban save ia ki jingpynkylla. |
06:55 | Ngin ia phai sha ka Terminal. |
06:58 | Mynta type: dot slash here dot sh. |
07:03 | Ngi lah ban iohi ia ka output kum 6 bad 4. |
07:08 | Number jong ki kyntien ha ka here document kadei 6 bad number jong ki kyntien ha ka here string kadei 4. |
07:15 | Ha kajuh ka rukom, phi lah ban thoh la kajong ka Here strings. |
07:20 | Da kane ngi lah poi sha kaba kut jong kane ka jinghikai. |
07:23 | To ngin ia batai kyllum. |
07:25 | Ha kane ka jinghikai, ngi la pule shaphang: |
07:27 | HERE document |
07:29 | HERE string. |
07:31 | Kum ka kam na ka bynta jong phi, pynlong ia u string sha u uppercase da kaba pyndonkam: |
07:36 | 'Here document'Here string. |
07:39 | Hint: tr space a hyphen z space capital A hyphen capital Z. |
07:47 | Kane ka command ba pynkylla ia ki character na lower sha upper case. |
07:54 | Peit ia ka video kaba don ha ka link ba lah ai harum. |
07:57 | Ka kyllum lang ia ka Spoken-Tutorial project. |
08:01 | Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien. |
08:06 | Ka kynhun jong ka Spoken Tutorial project: ka pynlong ia ki workshops da kaba pyndonkam da ki spoken tutorials. |
08:12 | Ka ai certificates sha kito kiba pass ha ka online test. |
08:17 | Na ka bynta ki jingtip ba kham bniah, sngewbha thoh sha ka contact@spoken-tutorial.org |
08:25 | Spoken Tutorial Project kadei shi bynta jong ka Talk to a Teacher project. |
08:29 | La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India. |
08:38 | Kham bun ki jingtip halor kane ka mission kidon ha ka link ba lah ai harum. |
08:44 | Ia kane ka script lah noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial. |
08:50 | Ma nga i Meboreen na Shillong, nga pynkut ia kane. |
08:54 | Khublei shibun. |