BASH/C2/Command-Line-arguments-and-Quoting/Khasi

From Script | Spoken-Tutorial
Revision as of 22:23, 1 May 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 tutorial halor ka Command line arguments and Quotingha BASH.
00:08 Ha kane ka jinghikai, ngin pule shaphang
00:11 Command line Arguments bad
00:13 Quoting.
00:15 Ban bud ia kane ka jinghikai, phi dei ban tip bad nang ia ka Linux Operating System.
00:20 na ka bynta ka jinghikai ba iadei bad kane sngewbha leit sha ka website jong ngi kumba la pyni
00:26 Na ka bynta kane ka jinghikai, nga pyndonkam:
00:29 Ubuntu Linux 12.04 OS
00:33 GNU Bash version 4.1.10
00:37 ka GNU Bash version 4 lane kiba kham shajrong la ai jingmut na ka bynta ka jinghikai
00:43 Shell script ka lah ban pdiang ia ki arguments na ka command line.
00:46 Ka argument la passed sha ka program kaba la call.
00:52 Bun ki arguments lah ban passed sha ka program.
00:57 To ngin plie ia ka terminal window da kaba nion Ctrl+Alt+T keys ha kajuh ka por na ka keyboard jong phi
01:06 Nga la dep thoh lypa ia u code ha ka file ba kyrteng arg.sh.
01:12 Ha ka terminal, to ngan plié ia kane ka file da kaba type-
01:16 gedit space arg.sh space ampersand sign(&).
01:23 Ngi pyndonkam ia u ampersand ban clear ia ka prompt.
01:27 Mynta, nion Enter.
01:30 Ka text editor ka la plié.
01:33 To ngan batai ia u code mynta.
01:36 Kane kadei ka shebang line.
01:39 Kane ka line kan print ia ka zeroth argument.
01:43 Hangne, $0 (Dollar zero) kan print ia ka kyrteng jong ka shell script.
01:48 Kane ka mut ba ka zeroth argument kadei ka kyrteng jong ka program hi.
01:55 To ngin execute ia ka program bad peit.
01:59 Phai sha ka terminal.
02:01 Nyngkong pynlong ia ka file executable da kaba type:
02:05 chmod space plus x space arg.sh
02:12 Nion Enter.
02:14 Mynta , type: dot slash arg.sh
02:18 Nion Enter. Ka output ka paw kum Zeroth argument is arg.sh.
02:26 Mynta, phai biang sha ka editor jong ngi bad type ia lai tylli ki lines kumba la pyni hangne.
02:33 $1 (Dollar one) ka kdew ia ka argument banyngkong ba la pass sha ka program na ka command line.
02:40 $2 (Dollar two) ka kdew ia ka argument ba ar kaba passed sha ka program
02:44 Bad $3 (Dollar three) ka kdew ia ka argument kaba lai.
02:48 Mynta, nion ha Save. To ngin execute ia ka program bad peit.
02:52 Nion ia u up-arrow key, nion Enter.
02:57 Ngi iohi ba ia u zeroth argument lah print.
03:00 Tangba ki arguments banyngkong , ba ar bad balai ki thylli.
03:05 Kane kadei namar ba ka command line arguments lah ai ha kapor jong ka execution.
03:11 Kumta, nion ia u up-arrow key bad type: sunday monday and tuesday
03:18 Nion Enter.
03:21 Phi iohi ba ki arguments banyngkong , ba ar bad balai kidei sunday monday and tuesday.
03:28 Mynta, phai biang sha ka editor jong ngi. Nion Enter.
03:33 Mynta, type ia ka line kumba la pyni hangne.
03:37 $12 (Dollar twelve) ka kdew ia ka argument ba khatar.
03:41 Ban thoh ia ka argument ba heh ban ia 9, ngi donkam ban pyndonkam ia ki curly brackets.
03:46 Lym kumta, ka bash kan shim tang ia ka argument jong u integer ba don ha ten's place
03:53 Bad phin nym ioh ia ka result kumba phi kwah.
03:57 Mynta, nion ha Save.
03:59 To ngin execute ia ka program.
04:01 Phai sha ka terminal.
04:04 To ngan clear ia ka prompt.
04:07 Mynta ngi donkam ban ai 12 lane 13 tylli kiarguments sha ka program.
04:12 Kumta , type : dot slash arg.sh space 1 to 13. Mynta nion Enter.
04:23 Phi iohi ba ka argument ba khatar kadei 12.
04:27 Phai biang sha ka editor jong ngi.
04:30 Bad type ia ka line kumba la pyni hangne
04:34 $# (Dollar hash) ka ai ia ka number jong ki arguments baroh kiba lah passed sha ka program
04:40 Mynta nion ha Save.
04:43 To ngin execute. Phai biang sha ka terminal.
04:46 To ngin execute. Nion ia u up-arrow key bad nion Enter.
04:52 Ngi iohi ba ka number jong ki arguments baroh kadei 13.
04:57 Mynta phai biang sha ka editor.
05:00 Nion Enter bad type ia ki lines kumba la pyni hangne.
05:04 $* (Dollar asterisk) kan print ia baroh ki arguments ha kawei ka lain
05:10 Ngin ia test ia kane da ka jingiarap jong ka for loop kaba suk.
05:14 Ngin sa iapeit ia kane ka for loop ha ka por ba ngi execute.
05:18 Mynta , nion ha Save. Phai biang sha ka terminal.
05:22 To ngan clear ia ka prompt.
05:26 Mynta, to ngin type: dot slash arg.sh space sunday monday and tuesday.
05:35 Nion Enter.
05:38 Phi iohi ba ka number jong baroh ki arguments kadei 3 namar ba ngi lah passed 3 arguments sha ka program jong ngi.
05:46 Kumba nga la ong hashwa, $* un print ia baroh ki arguments ha kawei ka lain
05:54 Bad kane kadei ka output na ka bynta ka for loop.
05:57 Ngi iohi ba baroh ki arguments lah print ha kawei ka lain.
06:02 Mynta, phai biang sha ka program jong ngi bad type ia ki lines kumba la pyni hangne.
06:09 $@ (Dollar at) ruh kan print ia baroh ki arguments.
06:13 Tangba , mynta man kawei ka argument yn sa print ha kawei kawei ka line
06:20 Kane kadei sa kawei pat ka for loop kaban print ia man kawei ka argument ha kawei kawei ka line
06:26 To ngin peit kumno. Nion ha Save.
06:29 Phai sha ka terminal.
06:32 Nion ia u up-arrow key.
06:34 Nion Enter. Phi iohi ia ka jingpher mynta.
06:39 Kine kidei ki arguments ba la print da $@.
06:43 $@. U print ia man kawei ka argument ha kawei kawei ka line.
06:47 Kane kadei ka output na ka bynta ka for loop Kaba ar.
06:52 Mynta to ngin iaid shakhmat sha quotingha BASH.
06:55 Phai biang sha ki slides.
06:57 Don lai jait ki quotes.
06:59 Double quote Single quote
07:02 Backslash. Double quote u buh ia u value jong variables bad commands.
07:09 Kum ka nuksa, echo “Username is $USER”.
07:13 Ka pyni ia ka username jong ka system.
07:17 Phai biang sha ka Terminal.
07:20 To ngan clear ia ka prompt.
07:23 Mynta , type: echo space hapoh double quotes Username space is dollar USER ha ki dak heh.
07:34 Nion Enter. Ka username jong ka system lah dep print.
07:39 Ka output kan iapher katkum ka system jong phi.
07:42 Mynta phai biang sha ki slides.
07:46 “single qoutes” ka pynsah ia ki jingmut ba shisha jong man ki character jong u “string” ba la ai.
07:53 La pyndonkam ia ka ban pynjah ia ka jingmut ba shisha jong man ki characters.
07:58 Phai biang sha ka Terminal.
08:01 Type: echo space hapoh single quote Username is dollar USER ha ki dak heh.
08:10 Nion Enter.
08:12 Ka output kadei Username is $USER.
08:16 Ha kane ka nuksa, ka print ia baroh ki dak kiba paw hapoh jong ki single quotes.
08:23 kam buh bujli ia u value jong variable $USER.
08:28 Phai biang sha ki slides jong ngi.
08:31 Backslash u weng ia ka jingmut ba kyrpang na u single character.
08:37 La pyndonkam kum u escape character ha BASH.
08:42 Phai biang sha ka Terminal.
08:44 Mynta , type: echo space hapoh double quote Username is backslash dollar USER (ha ki dak heh).
08:55 Namar ba ngi la ai double quotes, ngi khmih lynti ba ka echo command kan print ia ka username.
09:02 To ngin pyrshang ia kane ka command, te nion Enter.
09:06 Ka output kadei Username is $USER.
09:10 Ha kane ka nuksa, u backslash u weng ia ka jingmut ba kyrpang jong u (Dollar) '$' symbol.
09:16 $USER la khein kum uwei u string khlem don kano kano ka jingtreikam bapher.
09:22 Da kane ngi la poi sha kaba kut jong kane ka jinghikai.
09:25 Phai biang sha ki slides jong ngi.
09:27 To ngin batai kyllum. Ha kane ka jinghikai, ngi la pule shaphang
09:31 Command line arguments
09:33 Ka jingtreikam jong double quote, single quote bad backslash.
09:39 Peit ia ka video ba don ha ka link ba la ai harum
09:42 Ka batai kyllum ia ka Spoken-Tutorial project.
09:45 Lada phim don ia ka bandwidth kaba biang , phi lah ban shu download bad peit ia ka .
09:51 Ka kynhun jong ka Spoken-Tutorial Project :Ka pynlong ia ki workshops da kaba pyndonkam da ki spoken tutorials.
09:56 Ka ai sertiphikate sha kito kiba pass ha ka online test.
10:00 Na ka bynta ki jingtip ba bniah, sngewbha thoh sha ka contact@spoken-tutorial.org
10:07 Spoken Tutorial Projek kadei shibynta jong ka "Talk to a Teacher" projek.
10:10 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 link ba la ai harum http://spoken-tutorial.org/NMEICT-Intro
10:24 Kane ka script la noh synniang da ka FOSSEE bad ka kynhun jong ka Spoken-Tutorial .
10:30 Bad nga I Meboreen na Shillong , nga pynkut ia kane. Khublei shibun ia ka jingsnohkti lang jong phi.

Contributors and Content Editors

Meboreen Mary