“Polecenie AWK w Linux” Kod odpowiedzi

Awk Znaczenie w Linux

AWK (awk) is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems.
Creepy Capybara

Linux AWK

# usages
awk '{$1=""; print}' # print all except first column
awk '{$1=$3=$NF=$(NF-1)=""}1' file # print all except the 1ast and 3rd column and the last 1/2
awk -F"/" '{print $NF}' file #print only the last column
awk -F"/" '{print $NF-1}' file #print only the 2nd column from the end of string
Amused Anaconda

Polecenie AWK w Linux

awk '{$1=""; print}' # print all except first column
awk '{$1=$3=$NF=$(NF-1)=""}1' file # print all except the 1ast and 3rd column and the last 1/2
awk -F"/" '{print $NF}' file #print only the last column
awk -F"/" '{print $NF-1}' file #print only the 2nd column from the end of string
Gulshan Dharne

Odpowiedzi podobne do “Polecenie AWK w Linux”

Pytania podobne do “Polecenie AWK w Linux”

Więcej pokrewnych odpowiedzi na “Polecenie AWK w Linux” w Shell/Bash

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu