How to fix the error in the bash shell script?

前端 未结 2 1068
被撕碎了的回忆
被撕碎了的回忆 2021-01-29 10:32

I am trying a code in shell script. while I am trying to convert the code from batch script to shell script I am getting an error.

BATCH FILE CODE

:: Cr         


        
2条回答
  •  生来不讨喜
    2021-01-29 11:30

    Neither the batch script nor the shell script you posted are a good starting point so let's start from scratch. Sorry, this is too big for a comment.

    You want to find the latest snapshots made on a date and then want to store them in a file.

    What does that mean?

    Do the snapshot files have a timestamp in their name or in their content?

    If not - UNIX does not store file creation timestamps so is a last-modified timestamp adequate?

    Do you literally want to concatenate all of your snapshot files into one singe file or do you want to create a file that has a list of the snapshot file names?

    Post some sample input (e.g. some snapshot file names and contents if that's where the timestamp is stored) and the expected output given that input.

    Update your question to address all of the above, do not try to reply in a comment.

提交回复
热议问题