Get the App
SLTechnology News&Howtos  ›  Development  › 

How shell uses awk complex delimiters

Shulou Source: shulou.com Published: 2022-06-01 04:04:08 10月03日 Update

This article mainly introduces shell how to use awk complex separator, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Awk complex delimiter

Multiple characters as delimiters

$echo "a | | b | c | | d" | awk-F'[|] [|]'{print $3}'c

Multiple delimiter 1

$echo "a | | b print $4} d | awk-F'[|, #] +'{print $4}'d

Multiple delimiters 2

$echo "a | | bounded separc | # d" | awk-F'([|] [|]) | ([#] [#])'{print $NF}'c | # d Thank you for reading this article carefully. I hope the article "shell how to use awk complex separators" shared by the editor will be helpful to you. At the same time, I hope you can support it, pay attention to the industry information channel, and more related knowledge is waiting for you to learn!

Tags: Delimiters articles complex multiple value interest at the same time more friends knowledge editing industry information information channels channels multi-word reference learning help support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi macOS OPPO Reno Microsoft