Lab 3: Actions 1. How do you remove from the current directory all ordinary files with the names that: a. have numerals
Posted: Thu Jun 02, 2022 7:56 am
statement echo "$PATH $x". Now define x=5 at the prompt, and then run the script. Explain your observations and how you can rectify the behavior. 13. Given your directory contains three files flnl. fln* and flnt. How can you remove a file with name of fln* ? 4. How will you add the tags <html> and </html> to the beginning and end, respectively, of foo.html? 5. How will you store in a variable count a. The total size of all C source files (extension .c) b. The total number of lines in test.c. file 6. What set of commands could you use to determine how many files are in the /usr/bin directory? 7. Explain the following commands (assume the files "file 1.txt" exists in the working directory): mv "file 1.txt" filel.txt echo "`ls|wc -l` filel.txt" echo "'date "date"ยน" 8. Suppose that initially, there is no file in the current directory named "newfile". Will "newfile" appear in the output of 1s -1 >newfile Explain why or why not?
Lab 3: Actions 1. How do you remove from the current directory all ordinary files with the names that: a. have numerals as the first three characters. b. the first character is numeric, and the last character is not alphabetic c. contain 2017 as an embedded string except at the beginning or end. 2. A shell script foo contains the