If the File Is There
If this folder has a file named config.txt, print its first line. If it does not, print no config.
Example 1
config.txt
mode=fast size=3
notes.txt
x
prints
mode=fast
Example 2
notes.txt
x
prints
no config
Constraints
- The folder has up to 4 files
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- On One LineMedium
- Orders Over a HundredMedium
- Pull Out the NumbersMedium
- Rename Them AllMedium
- SquaresMedium
- Sum a ColumnMedium
- Swap Two ColumnsMedium
- The Longest LineMedium