# Append File

## 2018/03/26

Append file2 to file1, without overwriting the current file1.

cat file2 >> file1

Create and write to Text File Using the cat Command.

cat > input.txt
"Hello World"
# Ctrl+D to exit

The s command (as in substitute) is probably the most important in sed and has a lot of different options. The syntax of the s command is ‘s/regexp/replacement/flags’.

Its basic concept is simple: the s command attempts to match the pattern space against the supplied regular expression regexp; if the match is successful, then that portion of the pattern space which was matched is replaced with replacement.

sed -i 's/regexp/replacement/g' inputfile

The sync command synchronizes the contents of a bucket and a directory.

aws s3 sync ./public 's3://michael.taylor.ca'