Questão de Sistemas Operacionais — Linux — FUMARC 2014
Sistemas OperacionaisLinux
- Código
- qq056953
- Banca
- FUMARC
- Órgão
- AL-MG
- Ano
- 2014
- Nível
- Superior
- Cargo
- Analista de Sistemas - Administração de Rede
No Linux, considere a existência de um arquivo “arquivo.txt” no diretório corrente, com o seguinte conteúdo:linha 1 valor 10linha 2 valor 20linha 3 valor 30Deseja-se produzir, a partir do arquivo, a seguinte saída:1 - 102 - 203 - 30O script shell usado com comandos AWK que produz a saída desejada é:
- Aawk arquivo.txt '{ print $2" - "$4 }'
- Bcat arquivo.txt | awk '{ print $2" - "$4 }'
- Ccat arquivo.txt | awk '{ print $1" - "$3"\n" }'
- Dcat arquivo.txt | awk '{ printf($2" - "$4) }'