BASH/C3/More-on-Redirection/Khasi
From Script | Spoken-Tutorial
Revision as of 20:44, 18 July 2017 by Meboreen Mary (Talk | contribs)
Timee | Narration |
00:01 | Paralok, ngi pdiangsngewbha iaphi sha ka “spoken tutorial” halor ka “More on redirection”. |
00:07 | Ha kane ka jinghikai, ngin ia pule shaphang ka:
Redirection of both standard error and output ; |
00:13 | Ban append ia ka redirected output |
00:15 | Da ka jingiarap jong ki katto katne ki nuksa. |
00:19 | Ban bud ia kane ka jinghikai, phi dei ban don ia ka jingtip shaphang ka Shell Scripting ha ka BASH. |
00:25 | Lada phim don, na ka bynta ki jinghikai ba iadei, sngewbha leit sha ka website jong ngi kumba lah pyni. http://www.spoken-tutorial.org |
00:30 | Na ka bynta kane ka jinghikai, nga pyndonkam da ka: Ubuntu Linux 12.04 Operating System |
00:35 | GNU BASH version 4.2. |
00:39 | Sngewbha kynmaw, ka GNU Bash version 4 lane kaba kham shajrong lah ai jingmut na ka bynta kane ka jinghikai. |
00:46 | Ha ka jinghikai kaba hashwa, ngi lah pule shaphang ka standard output bad standard errors. |
00:52 | Baroh ar ka stderr bad stdout lah ban redirect sha kajuh ka file. |
00:58 | Ia kane lah ban leh ha kiba bun rukom. |
01:01 | Ngin ia leh ia ar tylli ki rukom kiba kham donkam tam jong ka redirection ha kane ka jinghikai. |
01:08 | Ka method ba nyngkong ban redirect ia baroh ar kastandard output bad ka error kadei da kaba pyndonkam da u &>(ampersand) bud da u greater-than sign. |
01:18 | Ka syntax kadei command space ampersand greater than space filename. |
01:25 | To ngan plie ia ka file kaba kyrteng ka redirect.sh. |
01:30 | Nga lah type katto katne ki code ha kane ka file. |
01:32 | Kane kadei ka shebang line. |
01:36 | ls ka lis ia ka directory content jong 2 tylli ki directories kiba kyrteng /usr bad /user. |
01:44 | Kynmaw ba ka /user directory kam don. |
01:48 | Te kumta ka command ls kan ai ia ka error. |
01:52 | '&'(ampersand) bud da u 'greater than' kan sa redirect ia u stdout badstderr sha ka out_(underscore)file.txt. |
02:03 | Mynta save ia ka file. |
02:05 | To ngin ia run ia ka file redirect.sh. |
02:07 | Plie ia ka terminal da kaba pyndonkam CTRL + ALT bad T keys ha kajuh kapor na ka keyboard jong phi. |
02:15 | Type: chmod space plus x space redirect dot sh |
02:23 | Shon Enter. |
02:25 | Type: dot slash redirect dot sh |
02:28 | Shon Enter. |
02:30 | Ngi lah ban iohi ia ka output da kaba plie out_(underscore)file.(dot)txt. |
02:36 | Type: cat space out_(underscore)file.(dot)txt. |
02:42 | Ngi lah ban iohi ia baroh ar ki error bad output. |
02:48 | Ka error na ka bynta ka directory /user lah record ha kane ka file. |
02:51 | Ka ong ba kam lap ia kata ka '/user' directory. |
02:56 | Ka directory content na ka bynta ka /usr ka paw. |
03:00 | Sngewbha kynmaw ba ka content na ka bynta ka '/usr' directory ka lah ban iapher ha ka system jong phi. |
03:06 | Mynta, to ngin ia pyndam ia kane ka file. Te, ha ka terminal, type: rm space out_(underscore)file. (dot)txt. |
03:15 | Kawei pat ka method kadei ban pyndonkam 2 greater than ampersand 1 hadien jong ka filename. |
03:24 | Ka syntax kadei command space greater than filename space 2 greater than ampersand 1. |
03:33 | Ngi lah ruh ban redirect sha ka file slash dev slash null (/dev/null) |
03:39 | To ngin ia pule khyndiat shaphang ka slash dev slash null (/dev/null) |
03:45 | Kadei ka file kaba kyrpang. |
03:48 | Kadei ka null file lane ka jaka ha kaba ngi lah ban lum thup ia kiei kiei baroh. |
03:52 | Ka kynthup ia ka khubor output bad error. |
03:57 | La khot ruh ia ka ka bit bucket. |
04:00 | To mynta ngin ia phai biang sha ka code ha ka gedit. |
04:04 | To ngin ia redirect ia baroh ar ki standard output bad error sha ka null file. |
04:11 | Ngan copy ia kane ka lain jong u code bad ngan paste ia u hangne hapoh. |
04:16 | Nga kwah ba baroh ar ki khubor jong ka output bad error kin jah noh. |
04:21 | Te, ngan pynkylla ia kane ka bynta jong u code ba lah copy. > (greater than) kaba mut truncate lane write. |
04:30 | slash dev slash null kadei ka null file. 2>&1 (2 greater than ampersand 1) |
04:37 | Number “2” un sa redirect ia u standard error sha ka standard output, ba lah buhdak da u number “1”. |
04:45 | Mynta, nion ha Save. Save ia u code. |
04:48 | To ngin ia run ia ka file redirect.sh. |
04:52 | Leit sha ka terminal. |
04:54 | Kynmaw ia ka command ba hashwa bad u up-arrow key. dot slash redirect.sh bad shon Enter. |
05:03 | Ngi lah ba iohi ia ka output da kaba type cat out_(underscore)file.(dot)txt. |
05:11 | Phai biang sha ki slides. |
05:15 | Ngi lah ban capture bad ruh ban append ia ka standard output lane error sha ka file. |
05:21 | Ka output lane ka error kan sa append ha kaba kut jong ka file. |
05:26 | Lada ka file kam don, kan sa shna ia ka file ba thymmai. |
05:31 | Ka syntax kadei command space greater than greater than space bud da ka filename . |
05:41 | To ngin ia pyrshang ban sngewthuh ia kane da ka nuksa. |
05:45 | To ngan plie ia ka file redirect.(dot)sh. |
05:49 | Mynta, hangne to ngin type: date space greater than greater than space out_(underscore)file.(dot)txt. |
06:00 | Ka 'date' command kan sa pyni ia ka system date kum ka output. |
06:06 | Ngi lah ban check ia kane ka command ha ka terminal da kaba type 'date.' |
06:11 | Phai biang sha ka terminal. Type date. Phi lah ban iohi ba ka system date kata ka current date lah pyni. |
06:23 | Ka output jong ka date command kan sa append sha ka out_(underscore)file.(dot)txt . |
06:31 | Ngi ia pyndonkam ia kane ka file ban capture ia ka standard output bad ka error jong ka 'ls' command. |
06:39 | Nion ha Save phai sha ka terminal. |
06:43 | Mynta shon ia u up-arrow key. Kynmaw ia ka command kaba hashwa ka dot slash redirect dot sh. |
06:50 | Bad shon Enter. |
06:52 | To ngin ia check ia ka output da kaba plie out_(underscore) file.(dot)txt. |
06:59 | Type: cat space out_(underscore)file.(dot)txt |
07:05 | Phin iohi ba ka output jong ka 'date' command lah append sha ba kut jong ka file. |
07:12 | Da kane ngi lah poi sha kaba kut jong kane ka jinghikai. |
07:15 | To ngin ia batai kyllum. |
07:17 | Ha kane ka jinghikai, ngi la pule shaphang ka: |
07:19 | Redirection jong baroh ar ki standard error bad output;
Bad ban append ia ka redirected output. |
07:27 | Kum ka kam na ka bynta jong phi: |
07:29 | Shna ia ka file X_(underscore)file.(dot)txt ryngkat bad katto katne ki contents. |
07:34 | Redirect ia ki contents jong baroh ar ki out_(underscore)file.(dot)txt bad X_(underscore)file.(dot)txt |
07:44 | Peit ia ka video kaba don ha ka link ba lah ai harum. |
07:47 | Ka kyllum lang ia ka Spoken-Tutorial project. |
07:51 | Lada phim don ia ka bandwidth kaba biang, phi lah ban shu download bad peit ia ka hadien. |
07:56 | 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. |
08:06 | Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka contact@spoken-tutorial.org |
08:13 | Spoken Tutorial project kadei shi bynta jong ka Talk to a Teacher project. |
08:17 | La kyrshan ia ka da ka National Mission on Education lyngba ka ICT, MHRD, Sorkar India.
Khambun ki jingtip halor kane ka mission kidon ha ka http://spoken-tutorial.org/NMEICT-Intro |
08:30 | Ia kane ka script la noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial. |
08:37 | Ma nga i Meboreen na Shillong. Khublei shibun. |