top of page
book of spells.webp

Start your journey towards mastering the CLI with our FREE Command Line Book of Spells.

By entering your email address you agree to receive emails from Command Line Wizardry. We'll respect your privacy and you can unsubscribe at any time.

Cybersecurity Ops with bash - Chapter 7 Solutions

  • Writer: Cybersecurity Ops with bash
    Cybersecurity Ops with bash
  • Apr 1, 2019
  • 1 min read

Below are selected solutions for the Chapter 7 workshop questions from Cybersecurity Ops with bash.


Question 1


The following example uses cut to print the first and tenth fields of the access.log file:


cut -d' ' -f1,10 access.log | bash summer.sh | sort -k 2.1 -rn


Replace the cut command with the awk command.


Answer


Since the access.log file uses whitespace as a field delimiter, you can use awk to access each field (column) directly using $ and the field number.



Question 3


Use the tr command to replace all of the semicolon characters in tasks.txt with the tab character and print the file to the screen.


Answer


Note that the tr command does not read a file directly, but rather accepts input from stdin.


 
 
 

5 Comments


Instant Gaming
Instant Gaming
Aug 10

If you love free games, SteamUnlocked should be your homepage.

Like

Instant Gaming
Instant Gaming
Jul 10

Eski ya da yeni oyunları arıyorsanız torrentoyunindir en doğru adres.

Like

Bagas31 pk
Bagas31 pk
May 31

Say goodbye to expensive subscriptions — Bagas31 gives you more for free.

Like

Mawto Org
Mawto Org
May 24

Want premium software for free? Visit Sigma4PC.

Like

Kms Pico
Kms Pico
May 22

Muitos usuários optam pelo kmspico Ativador por ser confiável e gratuito. A ativação feita com o kmspico Ativador é permanente e silenciosa. Você não precisa de licenças pagas ao usar o kmspico Ativador. Com o kmspico Ativador, você tem liberdade total no sistema operacional. O kmspico Ativador é livre de ameaças e verificado por especialistas. A interface do kmspico Ativador facilita o uso até para iniciantes. O kmspico Ativador pode ser usado em diversas máquinas sem restrições. Baixe o kmspico Ativador diretamente em nosso site sem complicações. Com o kmspico Ativador, seu sistema se mantém ativado por tempo ilimitado. O kmspico Ativador é uma escolha inteligente para ativação gratuita. Aproveite os benefícios do kmspico Ativador agora mesmo. Confie no kmspico Ativador para ativar Windows e Office com excelência.

Like
bottom of page