Question: Using Linux Write a script that takes 4 arguments. The first three are folders, and the last is a file.The script checks that it has
Using Linux
Write a script that takes 4 arguments. The first three are folders, and the last is a file.The script checks that it has gotten all 4 arguments, and that they all exist. Then, it will move the file into the folder that has the least files. In other words, given three folders, find which one has the minimum number of files, and send the given file there.
Write a script. The first time this script runs, it will show you the first file in your current folder. The next time you run it, it will show the second file. Next time, the third file, etc. Note that it only shows files, not folders. In other words, this script shows you files from your folder, one at a time, and remembers where it's at in the list for the next time you call it.Hint : your script may need to keep track of its current index by reading and saving to a file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
