Skip to content

Instantly share code, notes, and snippets.

@veritas06
Created November 12, 2017 19:03
Show Gist options
  • Save veritas06/aae60501b2a417e40145c147819f66c1 to your computer and use it in GitHub Desktop.
Save veritas06/aae60501b2a417e40145c147819f66c1 to your computer and use it in GitHub Desktop.
[Simple Copy Script] Putting this here just for notes really #bash
# Source: Ryan's Tutorials: Bash Scripting Tutorial - 2. Variables of 8
# URL: https://ryanstutorials.net/bash-scripting-tutorial/bash-variables.php
#!/bin/bash
# A simple copy script
cp $1 $2
# Let's verify the copy worked
echo Details for $2
ls -lh $2
# user@bash: ./mycopy.sh /projects/file1.data ./results.data
# Details for ./results.data
# -rw-r--r-- 18 ryan users 3.4M Feb 14 07:18 results.data
# user@bash:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment