veritas06
11/12/2017 - 7:03 PM

[Simple Copy Script] Putting this here just for notes really #bash

[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: