Create file vs custom end marker
I'm just new to learning Linux and I'm trying to find the value in the difference between two ways of creating simple files. The first is in creating a file and the second is with a custom end marker
cat > winter.txt
--- enter text ---
Ctrl d key
and
cat > hot.txt <<stop
> line 1
> line 2
> stop
The above two examples end up with giving the same end result. Other than the syntax, what is the real difference between the two and when would you want to use one over the other?
Thanks from a newbie linuxer!
cat > winter.txt
--- enter text ---
Ctrl d key
and
cat > hot.txt <<stop
> line 1
> line 2
> stop
The above two examples end up with giving the same end result. Other than the syntax, what is the real difference between the two and when would you want to use one over the other?
Thanks from a newbie linuxer!