/home/msabbar/sample_dir2
`-- sample_dir
|-- admin
|-- cambridge
| |-- cafeteria
| |-- library
| `-- security
| |-- annex
| |-- building
| `-- parking
|-- faculty
|-- history.exe
|-- markham
| |-- annex
| |-- building1
| `-- parking
`-- stenton
|-- gen_ed
| |-- Holidays
| `-- cars2
|-- lib_arts
| |-- english.txt
| `-- match.doc
`-- phone_directory
11 个目录,12 个文件
您当前的目录是 sample_dir。显示文件 cars2 的第 2 行,转换为大写(提示:以 'head' 命令开头):
好吧,我做到了
head -2 | tr "[a-z]" "[A-Z]" < stenton/gen_ed/cars2
和
head -n 2 | tr "[a-z]" "[A-Z]" < stenton/gen_ed/cars2
但这是错误的
我在这里做错了什么?