1 00:00:01,080 --> 00:00:09,420 ‫So redirection is a feature in Linux, so that when executing a command, you can change the standard 2 00:00:09,420 --> 00:00:11,190 ‫input output devices. 3 00:00:12,890 --> 00:00:17,870 ‫The standard input device, of course, is a keyboard in the standard output device is the screen. 4 00:00:20,420 --> 00:00:21,290 ‫But check this out. 5 00:00:21,770 --> 00:00:27,170 ‫A single greater than symbol is used to overwrite the output file with the result set. 6 00:00:29,980 --> 00:00:35,710 ‫The double greater than symbol is used to upend the result set to the target file. 7 00:00:37,410 --> 00:00:42,960 ‫The single less than symbol is used to add the results as an input for another command. 8 00:00:44,950 --> 00:00:50,860 ‫As you may remember, we practiced output redirection while running the cat in echo commands. 9 00:00:51,310 --> 00:00:52,300 ‫I wonder if you noticed? 10 00:00:53,200 --> 00:00:56,380 ‫Well, let's try it here and see if you recognize. 11 00:00:57,400 --> 00:01:03,160 ‫So first run, Echo Hello, World, single greater than my text file. 12 00:01:05,090 --> 00:01:06,620 ‫Now, look at the content of the file. 13 00:01:07,550 --> 00:01:08,840 ‫We overwrite the file. 14 00:01:10,320 --> 00:01:13,080 ‫So this time, let's use a double greater than symbol. 15 00:01:14,770 --> 00:01:17,680 ‫And this time we add a new line to the text file. 16 00:01:28,520 --> 00:01:30,560 ‫So let's use input redirection. 17 00:01:32,980 --> 00:01:40,000 ‫So in the previous lectures, we looked at the Etsy or Etsy slash password file, and that contains 18 00:01:40,000 --> 00:01:41,800 ‫a list of the system's accounts. 19 00:01:42,860 --> 00:01:45,740 ‫There were some values on a line separated by a colon. 20 00:01:46,800 --> 00:01:53,460 ‫Run cut, dash de colon dash F1 less than ETSI slash password. 21 00:01:54,930 --> 00:01:59,760 ‫So in the first command, we got the first values of each row with the dash of one parameter. 22 00:02:00,940 --> 00:02:07,540 ‫We needed a delimiter to separate them, and we use the colon for this with the dashti parameter. 23 00:02:09,270 --> 00:02:16,830 ‫So he gave the Etsy slash password file as the input to the first command by using input redirection. 24 00:02:19,340 --> 00:02:22,180 ‫So do you remember what this fire looked like before? 25 00:02:23,460 --> 00:02:26,190 ‫And as you can see, we extracted the first column of each line.