Monday, October 30, 2017

Concatenate multiple files with same headers (and only keep one header line in the output file)

awk '
FNR==1 && NR!=1 { while (/^<header>/) getline; }
1 {print}
'
file*.txt >all.txt
Note: the /^<header>/ part need to be changed to adapt to whatever the actual header is.

No comments:

Post a Comment

Any comments?

my-alpine and docker-compose.yml

 ``` version: '1' services:     man:       build: .       image: my-alpine:latest   ```  Dockerfile: ``` FROM alpine:latest ENV PYTH...