You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
612 B
29 lines
612 B
2 years ago
|
#!/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
|