Quantcast
Channel: sed - Confused what each field does - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 3

sed - Confused what each field does

$
0
0

I am really new in UNIX (bash) and been trying to play around with the language. I am currently trying to create a table with a fixed header from a .txt file.

So I came across a code which is like this :

column -t -s : <(echo Name:Age:Gender:Height:Weight) test.txt | sed "1{p;s/./*/g}"

I am totally stumped regarding the parts of the sed command at the end. I know that the ./*/g means that the sed is replacing all of . with * and /g means global occurrence.

However, what does the 1 and the p;s actually mean?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images