ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 06 May 2017 My Price 8.00

used to “timestamp” files

Write a bash script named a8q2.sh that can be used to “timestamp” files by renaming them.

The script should expect some arguments, which should be file names. If no arguments are given, the script should print a short help message about script usage and exit.

If some arguments are provided, the script should check that they are regular files and rename them to indicate the current time. For any argument that is not a regular file, a warning message should be printed. If an argument is a regular file, for example, file.txt it should be renamed according to the following rules. Let us say that the script is run on Nov 3, 2016, at 2:34pm. The script should try to rename the example file to2016-11-03-file.txt. However, if such file already exists, then the script should rename the file to 2016-11-03-1434-file.txt. If this file exists as well, then the script should keep looking for a file name such as:

2016-11-03-1434-1-file.txt

2016-11-03-1434-2-file.txt

2016-11-03-1434-3-file.txt

. . .

until a name is found such that such file does not exist. If the count reaches 1000, then the script should give up on renaming the file, report an error, and continue with the next argument.

Answers

(11)
Status NEW Posted 06 May 2017 05:05 AM My Price 8.00

-----------

Attachments

file 1494047874-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)