I have some configuration in file config
and would like to cat
that file. However, sometimes config
doesn't exist. In this case, I would like to have my command output a default value.
Perhaps something that worked like this:
$ ls
$ cat config || echo 42
42
$ echo 73 > config
$ cat config || echo 42
73