vault backup: 2024-04-21 22:58:56
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!bin/bash
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Please provide 2 files as arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$1" ] || [ ! -f "$2" ]; then
|
||||
echo "Both arguments must be files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print() {
|
||||
file="$1"
|
||||
echo "$file"
|
||||
head -n 2 "$file"
|
||||
}
|
||||
|
||||
print "$1"
|
||||
print "$2"
|
||||
|
||||
echo "Total number of characters is: $(cat "$1" "$2" | wc -c)"
|
Reference in New Issue
Block a user