Hot answers tagged

11 votes
Accepted

What does mean `^(*.c|*.md)`

In Zsh, ^ is a glob operator available when EXTENDED_GLOB is set, matching anything except the following pattern. The parentheses group a pattern; this is useful in particular with disjunctions (|) ...
Stephen Kitt's user avatar
1 vote

Read nth column iteratively in two large files, cut and paste side by side to create new nth file

Assumptions: all files have at least one row (the header) all files have the same number of rows all files have the same number of columns all files can fit into memory (via an awk array) General ...
markp-fuso's user avatar
1 vote
Accepted

Read nth column iteratively in two large files, cut and paste side by side to create new nth file

Like this, using bash and awk to get number of columns and usual commands in the toolchest: #!/bin/bash for i in $(seq 1 $(awk '{print NF;exit}' test1.txt)); do paste <(sed 1d test1.txt | cut ...
Gilles Quénot's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible