unix4artists/bash/cat.sh

29 lines
612 B
Bash

#!/bin/bash -e
#####################################################
#
# "cat" is an application that prints text files
# into your terminal and allows you to concatinate
# multiple files together.
#
# Usage: bash bash/cat.sh
#
#####################################################
cat "text/cat1.txt"
sleep 2
# Concatinate multiple files and print the result
cat "text/cat2.txt" "text/cat3.txt"
sleep 2
# Concatinate all files into a new file using the ">" redirect operator
cat "text/cat1.txt" "text/cat2.txt" "text/cat3.txt" > "text/all.txt"
sleep 2
# Print the contents of this file
cat bash/cat.sh