Difference between revisions of "BOSS-Linux/C2/Simple-filters/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) (Created page with "{| border=1 |'''Time''' |'''Narration''' |- | 00:02 | Hello and welcome to the Spoken Tutorial on Simple Filters with Linux. |- |00:09 | Here we will be learning about '''hea...") |
PoojaMoolya (Talk | contribs) |
||
Line 3: | Line 3: | ||
|'''Narration''' | |'''Narration''' | ||
|- | |- | ||
− | | 00: | + | | 00:00 |
| Hello and welcome to the Spoken Tutorial on Simple Filters with Linux. | | Hello and welcome to the Spoken Tutorial on Simple Filters with Linux. | ||
|- | |- | ||
− | |00: | + | |00:08 |
| Here we will be learning about '''head, Tail, sort, cut''' and '''paste.''' | | Here we will be learning about '''head, Tail, sort, cut''' and '''paste.''' | ||
|- | |- | ||
− | | 00: | + | | 00:17 |
| All these are command line text manipulation tools. | | All these are command line text manipulation tools. | ||
|- | |- | ||
Line 22: | Line 22: | ||
|- | |- | ||
| 00:46 | | 00:46 | ||
− | | I am using | + | | I am using Ubuntu 10.10 for this tutorial. |
|- | |- | ||
|00:51 | |00:51 | ||
Line 28: | Line 28: | ||
|- | |- | ||
|01:02 | |01:02 | ||
− | | We use the | + | | We use the Head command followed by an '''ascii''' file name, to display the first 10 lines of a file by default. |
|- | |- | ||
| 01:10 | | 01:10 | ||
− | | Let us create a file. | + | | Let us create a file. I am hitting on '''ESC''' (escape) key to show this practically. |
|- | |- | ||
− | | 01: | + | | 01:17 |
|Go to '''Applications > Accessories > Text Editor.''' | |Go to '''Applications > Accessories > Text Editor.''' | ||
|- | |- | ||
− | | 01: | + | | 01:24 |
|I already have these numbers in another file for the sake of time constrain . | |I already have these numbers in another file for the sake of time constrain . | ||
|- | |- | ||
− | | 01: | + | | 01:30 |
|Let me copy and paste. | |Let me copy and paste. | ||
|- | |- | ||
− | | 01: | + | | 01:38 |
| Hit on '''File''' , '''Save.''' | | Hit on '''File''' , '''Save.''' | ||
|- | |- | ||
− | | 01: | + | | 01:41 |
|Name the file as '''numbers dot txt''' and hit on '''save''' | |Name the file as '''numbers dot txt''' and hit on '''save''' | ||
|- | |- | ||
− | | 01: | + | | 01:48 |
|Close this file. | |Close this file. | ||
|- | |- | ||
− | | 01: | + | | 01:53 |
| Now go to '''Applications > Accessories > Terminal.''' | | Now go to '''Applications > Accessories > Terminal.''' | ||
|- | |- | ||
− | | | + | | 02:01 |
| Let us try to see if we can see the file we created. | | Let us try to see if we can see the file we created. | ||
|- | |- | ||
− | | 02: | + | | 02:05 |
|Type '''ls''' and hit on '''enter.''' | |Type '''ls''' and hit on '''enter.''' | ||
|- | |- | ||
− | | 02: | + | | 02:09 |
|What we did here is to list all the folders and files on our '''home''' directory. | |What we did here is to list all the folders and files on our '''home''' directory. | ||
|- | |- | ||
− | | 02: | + | | 02:15 |
− | | Now we can use the | + | | Now we can use the cat command to read the contents of the file we created. |
|- | |- | ||
− | | 02: | + | | 02:21 |
| '''Cat n-u-m''' Hit on '''tab''' to autofill the file name. Hit on '''Enter.''' | | '''Cat n-u-m''' Hit on '''tab''' to autofill the file name. Hit on '''Enter.''' | ||
|- | |- | ||
− | | 02: | + | | 02:29 |
− | | Let us do the same with | + | | Let us do the same with head command. |
|- | |- | ||
− | | 02: | + | | 02:33 |
| '''head numbers dot txt''', '''enter''' | | '''head numbers dot txt''', '''enter''' | ||
|- | |- | ||
− | | 02: | + | | 02:39 |
| Now the first 10 lines are displayed. | | Now the first 10 lines are displayed. | ||
|- | |- | ||
− | | 02: | + | | 02:43 |
| If we want to see the first 5 lines, use the option ''' hyphen n5''' in between the '''head''' command and the file. | | If we want to see the first 5 lines, use the option ''' hyphen n5''' in between the '''head''' command and the file. | ||
|- | |- | ||
− | | 02: | + | | 02:52 |
| Hit on Up arrow, '''hyphen n5''' and '''Enter.''' | | Hit on Up arrow, '''hyphen n5''' and '''Enter.''' | ||
|- | |- | ||
− | | 02: | + | | 02:58 |
| Now the first 5 lines alone are displayed. | | Now the first 5 lines alone are displayed. | ||
|- | |- | ||
− | | | + | | 03:02 |
|Let us switch back to the presentation | |Let us switch back to the presentation | ||
− | |||
|- | |- | ||
− | | 03: | + | | 03:08 |
+ | |'''F5''' | ||
+ | |- | ||
+ | | 03:14 | ||
| The '''tail''' command works exactly opposite to the '''head''' command, it displays the last 10 lines of a file by default. | | The '''tail''' command works exactly opposite to the '''head''' command, it displays the last 10 lines of a file by default. | ||
|- | |- | ||
− | | 03: | + | | 03:22 |
| I am hitting on '''ALT''' and '''Tab''' to switch to the terminal. | | I am hitting on '''ALT''' and '''Tab''' to switch to the terminal. | ||
|- | |- | ||
− | | 03: | + | | 03:27 |
| '''tail numbers dot txt''' | | '''tail numbers dot txt''' | ||
|- | |- | ||
− | | 03: | + | | 03:31 |
| If we want to see just the last 5 lines, use the option '''hyphen n5''' in between the '''tail command''' and the file name. | | If we want to see just the last 5 lines, use the option '''hyphen n5''' in between the '''tail command''' and the file name. | ||
|- | |- | ||
− | | 03: | + | | 03:40 |
| '''hyphen n5''', '''Enter''' | | '''hyphen n5''', '''Enter''' | ||
|- | |- | ||
− | | 03: | + | | 03:45 |
| Switch to slides | | Switch to slides | ||
|- | |- | ||
− | | 03: | + | | 03:50 |
| A log file contains events which took place in a system. | | A log file contains events which took place in a system. | ||
|- | |- | ||
− | | 03: | + | | 03:55 |
| '''Auth dot log''' file maintains log's for who logged in & who logged out. | | '''Auth dot log''' file maintains log's for who logged in & who logged out. | ||
|- | |- | ||
− | | | + | | 04:01 |
| The most useful option of the tail command is to use '''hyphen f''' option to follow the tail of a log file. | | The most useful option of the tail command is to use '''hyphen f''' option to follow the tail of a log file. | ||
− | |||
− | |||
− | |||
|- | |- | ||
| 04:09 | | 04:09 | ||
+ | |If a new line is appended to the log file, the tail command will take that as the last line and display 10 lines by default above it. | ||
+ | |- | ||
+ | | 04:18 | ||
| Go to the terminal | | Go to the terminal | ||
|- | |- | ||
− | | 04: | + | | 04:21 |
|'''tail hyphen f forward slash var slash log slash auth dot log''' | |'''tail hyphen f forward slash var slash log slash auth dot log''' | ||
|- | |- | ||
− | | 04: | + | | 04:31 |
| Let me resize this terminal | | Let me resize this terminal | ||
|- | |- | ||
− | | 04: | + | | 04:39 |
| Let us open another Terminal , '''Application- > Accessories - > Terminal.''' | | Let us open another Terminal , '''Application- > Accessories - > Terminal.''' | ||
|- | |- | ||
− | | 04: | + | | 04:46 |
| Let me resize this terminal | | Let me resize this terminal | ||
|- | |- | ||
− | | 04: | + | | 04:52 |
|so that I can show you in a single screen how '''tail''' follows the last line in a '''log''' file. | |so that I can show you in a single screen how '''tail''' follows the last line in a '''log''' file. | ||
|- | |- | ||
− | | | + | | 05:00 |
| Try to '''su''' as yourself, hit on '''enter.''' | | Try to '''su''' as yourself, hit on '''enter.''' | ||
|- | |- | ||
− | | | + | | 05:05 |
| Give in some wrong password hit on '''enter.''' | | Give in some wrong password hit on '''enter.''' | ||
|- | |- | ||
− | | | + | | 05:08 |
| You will see that the terminal on which '''tail''' is running is appended with a new '''log.''' | | You will see that the terminal on which '''tail''' is running is appended with a new '''log.''' | ||
|- | |- | ||
− | | 05: | + | | 05:15 |
|The date & time specifies when the '''authentication failure''' took place. | |The date & time specifies when the '''authentication failure''' took place. | ||
|- | |- | ||
− | | 05: | + | | 05:23 |
| Type '''date''' hit on '''enter''' to verify the system date and time. | | Type '''date''' hit on '''enter''' to verify the system date and time. | ||
|- | |- | ||
− | | 05: | + | | 05:32 |
| Type '''Exit''' to close this terminal. | | Type '''Exit''' to close this terminal. | ||
|- | |- | ||
− | | 05: | + | | 05:36 |
− | | Hit '''CTRL C''' to close the running | + | | Hit '''CTRL C''' to close the running tail command & maximize the screen. |
|- | |- | ||
− | | 05: | + | | 05:51 |
| We have seen only '''auth dot log''' file in the previous example. | | We have seen only '''auth dot log''' file in the previous example. | ||
|- | |- | ||
− | | 05: | + | | 05:57 |
|These are the commonly used log files in Linux. | |These are the commonly used log files in Linux. | ||
|- | |- | ||
− | | | + | | 06:01 |
| A linux system administrator will look into these log files for more information to troubleshoot his machine if there is a problem. | | A linux system administrator will look into these log files for more information to troubleshoot his machine if there is a problem. | ||
|- | |- | ||
− | | 06: | + | | 06:12 |
| '''Sort''' command as the name suggest will sort a file for us in both ascending and descending order. | | '''Sort''' command as the name suggest will sort a file for us in both ascending and descending order. | ||
|- | |- | ||
− | | 06: | + | | 06:23 |
| '''sort numbers dot txt''' .This would sort our '''numbers dot txt''' file in ascending order. | | '''sort numbers dot txt''' .This would sort our '''numbers dot txt''' file in ascending order. | ||
|- | |- | ||
− | | 06: | + | | 06:31 |
| Notice something is strange in there, sort just looks at the first character to sort, so '''10''','''11'''&'''12''' appears before the number 2. | | Notice something is strange in there, sort just looks at the first character to sort, so '''10''','''11'''&'''12''' appears before the number 2. | ||
|- | |- | ||
− | | 06: | + | | 06:43 |
| To avoid this add the option of '''hyphen n''', hyphen n and Enter | | To avoid this add the option of '''hyphen n''', hyphen n and Enter | ||
|- | |- | ||
− | | 06: | + | | 06:53 |
| Now sort looks at the entire number to sort them. | | Now sort looks at the entire number to sort them. | ||
|- | |- | ||
− | | 06: | + | | 06:58 |
| To sort '''number dot txt''' in reverse order add an option of '''hyphen r.''' | | To sort '''number dot txt''' in reverse order add an option of '''hyphen r.''' | ||
|- | |- | ||
− | | | + | | 07:09 |
| We have numbers that repeat in this file, to pull out just the unique numbers add another option of '''hyphen u''' . | | We have numbers that repeat in this file, to pull out just the unique numbers add another option of '''hyphen u''' . | ||
|- | |- | ||
− | | 07: | + | | 07:17 |
| Go to Terminal. | | Go to Terminal. | ||
|- | |- | ||
− | |07: | + | |07:20 |
| Up Arrow | | Up Arrow | ||
|- | |- | ||
− | | 07: | + | | 07:22 |
|'''U, enter''', | |'''U, enter''', | ||
|- | |- | ||
− | | 07: | + | | 07:26 |
|Previously two 2's were displayed . Now only one 2 is displayed. | |Previously two 2's were displayed . Now only one 2 is displayed. | ||
|- | |- | ||
− | | 07: | + | | 07:38 |
| Now we will see how we can sort a file based on certain column. | | Now we will see how we can sort a file based on certain column. | ||
|- | |- | ||
− | | 07: | + | | 07:44 |
| Let us create a file and key in these as shown below. | | Let us create a file and key in these as shown below. | ||
|- | |- | ||
− | | 07: | + | | 07:48 |
|Go to '''Applications > Accessories > Text Editor.''' | |Go to '''Applications > Accessories > Text Editor.''' | ||
|- | |- | ||
− | | 07: | + | | 07:57 |
| I already have the data in another file for the sake of time constrain let me copy & Paste the value, '''CTRL+C; CTRL+V.''' | | I already have the data in another file for the sake of time constrain let me copy & Paste the value, '''CTRL+C; CTRL+V.''' | ||
|- | |- | ||
− | | 08: | + | | 08:11 |
| File, Save it as '''marks dot txt''', Hit on '''Save.''' | | File, Save it as '''marks dot txt''', Hit on '''Save.''' | ||
|- | |- | ||
− | | 08: | + | | 08:21 |
| Don't mind the special characters on this file I don't want someone to sue me for giving them low marks | | Don't mind the special characters on this file I don't want someone to sue me for giving them low marks | ||
|- | |- | ||
− | | 08: | + | | 08:28 |
| Close this file. | | Close this file. | ||
|- | |- | ||
− | | 08: | + | | 08:33 |
| Let us sort based on the second column of '''marks dot txt file. ''' | | Let us sort based on the second column of '''marks dot txt file. ''' | ||
|- | |- | ||
− | | 08: | + | | 08:40 |
| Go to the terminal. | | Go to the terminal. | ||
|- | |- | ||
− | | 08: | + | | 08:42 |
|'''sort space marks dot txt space hyphen t space open inverted commas space close inverted commas space''' | |'''sort space marks dot txt space hyphen t space open inverted commas space close inverted commas space''' | ||
|- | |- | ||
− | | 08: | + | | 08:53 |
|here '''hyphen t''' stands for the '''delimiter''' & the space in between the quotes represents it. | |here '''hyphen t''' stands for the '''delimiter''' & the space in between the quotes represents it. | ||
|- | |- | ||
− | | | + | | 09:02 |
|'''hyphen k2''' for the second column on which sort should be performed. | |'''hyphen k2''' for the second column on which sort should be performed. | ||
|- | |- | ||
− | | 09: | + | | 09:14 |
|Hit on '''Enter.''' | |Hit on '''Enter.''' | ||
|- | |- | ||
− | | 09: | + | | 09:20 |
|'''Cat marks dot txt''' | |'''Cat marks dot txt''' | ||
|- | |- | ||
− | | 09: | + | | 09:24 |
|This is the original file, if you see '''Avir''' is moved above and '''Bala''' came below when we sorted based on the second column alone. | |This is the original file, if you see '''Avir''' is moved above and '''Bala''' came below when we sorted based on the second column alone. | ||
|- | |- | ||
− | | 09: | + | | 09:43 |
|'''Cut''' command is used to cut just certain information from a file. | |'''Cut''' command is used to cut just certain information from a file. | ||
|- | |- | ||
− | | 09: | + | | 09:51 |
|Let us pull out the names from '''marks dot txt''' | |Let us pull out the names from '''marks dot txt''' | ||
|- | |- | ||
− | | 09: | + | | 09:55 |
|Let us go to the terminal '''ALT Tab''' | |Let us go to the terminal '''ALT Tab''' | ||
|- | |- | ||
− | | 09: | + | | 09:58 |
|'''cut space marks dot txt space hyphen d space open inverted commas space close inverted commas space.''' | |'''cut space marks dot txt space hyphen d space open inverted commas space close inverted commas space.''' | ||
|- | |- | ||
− | | | + | |10:08 |
− | |here in '''cut''' command '''d''' is the delimiter & the space | + | |here in '''cut''' command '''d''' is the delimiter & the space inbetween the quotes represents the delimiter. |
|- | |- | ||
− | |10: | + | |10:20 |
|'''hyphen f2''' for the second column. Hit on '''enter.''' | |'''hyphen f2''' for the second column. Hit on '''enter.''' | ||
|- | |- | ||
− | |10: | + | |10:31 |
|'''Paste''' command will merge corresponding subsequent lines of the files. | |'''Paste''' command will merge corresponding subsequent lines of the files. | ||
|- | |- | ||
− | |10: | + | |10:36 |
| Let us use both the '''numbers dot txt''' and '''marks dot txt file''' now. | | Let us use both the '''numbers dot txt''' and '''marks dot txt file''' now. | ||
|- | |- | ||
− | |10: | + | |10:41 |
|Go to the terminal. | |Go to the terminal. | ||
|- | |- | ||
− | |10: | + | |10:43 |
|'''Paste numbers dot txt marks dot txt''', '''enter''' | |'''Paste numbers dot txt marks dot txt''', '''enter''' | ||
|- | |- | ||
− | |10: | + | |10:50 |
− | |Now the first line of '''marks dot txt | + | |Now the first line of '''marks dot txt was appended to the first line of numbers dot txt. |
|- | |- | ||
− | |10: | + | |10:57 |
|We can use the redirect key to redirect this output to some other file called '''concatefile dot txt. ''' | |We can use the redirect key to redirect this output to some other file called '''concatefile dot txt. ''' | ||
|- | |- | ||
− | | | + | | 11:06 |
| Go to the terminal. | | Go to the terminal. | ||
|- | |- | ||
− | | | + | | 11:08 |
| Hit on Up arrow. Hit on the redirect key which is the Greater than symbol '''concatfile dot txt'''. Hit on '''Enter.''' | | Hit on Up arrow. Hit on the redirect key which is the Greater than symbol '''concatfile dot txt'''. Hit on '''Enter.''' | ||
|- | |- | ||
− | | 11: | + | | 11:18 |
| '''Cat concatfile dot txt''' | | '''Cat concatfile dot txt''' | ||
|- | |- | ||
− | | 11: | + | | 11:22 |
| Let us go to the slide. | | Let us go to the slide. | ||
|- | |- | ||
− | | 11: | + | | 11:25 |
| If we want paste to print out the numbers serially delimited with tab we can use the '''hyphen s''' option. | | If we want paste to print out the numbers serially delimited with tab we can use the '''hyphen s''' option. | ||
|- | |- | ||
− | | 11: | + | | 11:34 |
| '''Paste hyphen s''' | | '''Paste hyphen s''' | ||
|- | |- | ||
− | |11: | + | |11:39 |
|'''numbers dot txt''' | |'''numbers dot txt''' | ||
|- | |- | ||
− | | 11: | + | | 11:43 |
| Go to the slide. | | Go to the slide. | ||
|- | |- | ||
− | | 11: | + | | 11:45 |
| Spoken Tutorial project is a part of Talk to a Teacher project, | | Spoken Tutorial project is a part of Talk to a Teacher project, | ||
|- | |- | ||
− | |11: | + | |11:49 |
|Supported by the National Mission on Education through ICT,MHRD, Government of India. | |Supported by the National Mission on Education through ICT,MHRD, Government of India. | ||
|- | |- | ||
− | | 11: | + | | 11:55 |
| For more information you can refer to the following link. | | For more information you can refer to the following link. | ||
|- | |- | ||
− | |11: | + | |11:59 |
− | |This is | + | |This script has been contributed by ----------------------(name of the translator) and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off. |
+ | |||
|} | |} |
Revision as of 14:18, 4 December 2014
Time | Narration |
00:00 | Hello and welcome to the Spoken Tutorial on Simple Filters with Linux. |
00:08 | Here we will be learning about head, Tail, sort, cut and paste. |
00:17 | All these are command line text manipulation tools. |
00:22 | If you see a hash (#) symbol on the Terminal you need to become root to execute those commands |
00:29 | sudo su or su root, if you see a dollar symbol on the Terminal you can be an ordinary user to execute those commands. |
00:38 | I assume that you did a default installation and did not modify any path where the files are getting saved. |
00:46 | I am using Ubuntu 10.10 for this tutorial. |
00:51 | Prerequisites for this module are the ability to use the mouse , keyboard, maximize and minimize buttons on a window. |
01:02 | We use the Head command followed by an ascii file name, to display the first 10 lines of a file by default. |
01:10 | Let us create a file. I am hitting on ESC (escape) key to show this practically. |
01:17 | Go to Applications > Accessories > Text Editor. |
01:24 | I already have these numbers in another file for the sake of time constrain . |
01:30 | Let me copy and paste. |
01:38 | Hit on File , Save. |
01:41 | Name the file as numbers dot txt and hit on save |
01:48 | Close this file. |
01:53 | Now go to Applications > Accessories > Terminal. |
02:01 | Let us try to see if we can see the file we created. |
02:05 | Type ls and hit on enter. |
02:09 | What we did here is to list all the folders and files on our home directory. |
02:15 | Now we can use the cat command to read the contents of the file we created. |
02:21 | Cat n-u-m Hit on tab to autofill the file name. Hit on Enter. |
02:29 | Let us do the same with head command. |
02:33 | head numbers dot txt, enter |
02:39 | Now the first 10 lines are displayed. |
02:43 | If we want to see the first 5 lines, use the option hyphen n5 in between the head command and the file. |
02:52 | Hit on Up arrow, hyphen n5 and Enter. |
02:58 | Now the first 5 lines alone are displayed. |
03:02 | Let us switch back to the presentation |
03:08 | F5 |
03:14 | The tail command works exactly opposite to the head command, it displays the last 10 lines of a file by default. |
03:22 | I am hitting on ALT and Tab to switch to the terminal. |
03:27 | tail numbers dot txt |
03:31 | If we want to see just the last 5 lines, use the option hyphen n5 in between the tail command and the file name. |
03:40 | hyphen n5, Enter |
03:45 | Switch to slides |
03:50 | A log file contains events which took place in a system. |
03:55 | Auth dot log file maintains log's for who logged in & who logged out. |
04:01 | The most useful option of the tail command is to use hyphen f option to follow the tail of a log file. |
04:09 | If a new line is appended to the log file, the tail command will take that as the last line and display 10 lines by default above it. |
04:18 | Go to the terminal |
04:21 | tail hyphen f forward slash var slash log slash auth dot log |
04:31 | Let me resize this terminal |
04:39 | Let us open another Terminal , Application- > Accessories - > Terminal. |
04:46 | Let me resize this terminal |
04:52 | so that I can show you in a single screen how tail follows the last line in a log file. |
05:00 | Try to su as yourself, hit on enter. |
05:05 | Give in some wrong password hit on enter. |
05:08 | You will see that the terminal on which tail is running is appended with a new log. |
05:15 | The date & time specifies when the authentication failure took place. |
05:23 | Type date hit on enter to verify the system date and time. |
05:32 | Type Exit to close this terminal. |
05:36 | Hit CTRL C to close the running tail command & maximize the screen. |
05:51 | We have seen only auth dot log file in the previous example. |
05:57 | These are the commonly used log files in Linux. |
06:01 | A linux system administrator will look into these log files for more information to troubleshoot his machine if there is a problem. |
06:12 | Sort command as the name suggest will sort a file for us in both ascending and descending order. |
06:23 | sort numbers dot txt .This would sort our numbers dot txt file in ascending order. |
06:31 | Notice something is strange in there, sort just looks at the first character to sort, so 10,11&12 appears before the number 2. |
06:43 | To avoid this add the option of hyphen n, hyphen n and Enter |
06:53 | Now sort looks at the entire number to sort them. |
06:58 | To sort number dot txt in reverse order add an option of hyphen r. |
07:09 | We have numbers that repeat in this file, to pull out just the unique numbers add another option of hyphen u . |
07:17 | Go to Terminal. |
07:20 | Up Arrow |
07:22 | U, enter, |
07:26 | Previously two 2's were displayed . Now only one 2 is displayed. |
07:38 | Now we will see how we can sort a file based on certain column. |
07:44 | Let us create a file and key in these as shown below. |
07:48 | Go to Applications > Accessories > Text Editor. |
07:57 | I already have the data in another file for the sake of time constrain let me copy & Paste the value, CTRL+C; CTRL+V. |
08:11 | File, Save it as marks dot txt, Hit on Save. |
08:21 | Don't mind the special characters on this file I don't want someone to sue me for giving them low marks |
08:28 | Close this file. |
08:33 | Let us sort based on the second column of marks dot txt file. |
08:40 | Go to the terminal. |
08:42 | sort space marks dot txt space hyphen t space open inverted commas space close inverted commas space |
08:53 | here hyphen t stands for the delimiter & the space in between the quotes represents it. |
09:02 | hyphen k2 for the second column on which sort should be performed. |
09:14 | Hit on Enter. |
09:20 | Cat marks dot txt |
09:24 | This is the original file, if you see Avir is moved above and Bala came below when we sorted based on the second column alone. |
09:43 | Cut command is used to cut just certain information from a file. |
09:51 | Let us pull out the names from marks dot txt |
09:55 | Let us go to the terminal ALT Tab |
09:58 | cut space marks dot txt space hyphen d space open inverted commas space close inverted commas space. |
10:08 | here in cut command d is the delimiter & the space inbetween the quotes represents the delimiter. |
10:20 | hyphen f2 for the second column. Hit on enter. |
10:31 | Paste command will merge corresponding subsequent lines of the files. |
10:36 | Let us use both the numbers dot txt and marks dot txt file now. |
10:41 | Go to the terminal. |
10:43 | Paste numbers dot txt marks dot txt, enter |
10:50 | Now the first line of marks dot txt was appended to the first line of numbers dot txt. |
10:57 | We can use the redirect key to redirect this output to some other file called concatefile dot txt. |
11:06 | Go to the terminal. |
11:08 | Hit on Up arrow. Hit on the redirect key which is the Greater than symbol concatfile dot txt. Hit on Enter. |
11:18 | Cat concatfile dot txt |
11:22 | Let us go to the slide. |
11:25 | If we want paste to print out the numbers serially delimited with tab we can use the hyphen s option. |
11:34 | Paste hyphen s |
11:39 | numbers dot txt |
11:43 | Go to the slide. |
11:45 | Spoken Tutorial project is a part of Talk to a Teacher project, |
11:49 | Supported by the National Mission on Education through ICT,MHRD, Government of India. |
11:55 | For more information you can refer to the following link. |
11:59 | This script has been contributed by ----------------------(name of the translator) and this is -----------------------(name of the recorder) from --------------------------(name of the place)signing off. |