Shell script and command-line | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Shell script and command-line

Implement the shell program using case and command line arguments to perform the following Usage should be below:: $ fileops.sh c fname would copy fname to fname.cpy $ fileops.sh m fname would move fname to old.fname $ fileops.sh d fname would delete fname from the directory $ fileops.sh p fname would change the permission of the file to readonly for group and others Anyone explain this?

15th Feb 2022, 4:52 AM
MANIKANDAN S
MANIKANDAN S - avatar
1 ответ
+ 1
The program takes 2 inputs on the command line, then depending on what it is, you do something Step1: declare two variables for input - arg - filname Step 2: if statement to do something to that file depending in arguement
15th Feb 2022, 7:14 AM
Raul Ramirez
Raul Ramirez - avatar