Skip to content

Instantly share code, notes, and snippets.

@debajyoti-thetaonelab
Created March 19, 2019 11:11
Show Gist options
  • Select an option

  • Save debajyoti-thetaonelab/8cbe77d2b9da22ac082fd15e042f5cbf to your computer and use it in GitHub Desktop.

Select an option

Save debajyoti-thetaonelab/8cbe77d2b9da22ac082fd15e042f5cbf to your computer and use it in GitHub Desktop.
some description
#!/bin/bash
DATE_TIME=$(date +%Y-%m-%d_%H-%M)
CP_FILE=server.log_${DATE_TIME}
if [[ -e $CP_FILE ]]; then
echo "$CP_FILE exists, please try in next min"
exit 1
fi
cp server.log $CP_FILE
echo "" > server.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment