[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] bash suitable for parsing big files?

From: adrelanos
Subject: [Help-bash] bash suitable for parsing big files?
Date: Fri, 13 Sep 2013 00:05:25 +0000


I've been using:

mapfile -t lines < "/var/lib/dpkg/status"
for line in "address@hidden"; do
... (parsing it with things like awk, {var:0:6}, {var,,} and
pkg_arch[$package]="$arch".) ...

For those who don't know /var/lib/dpkg/status, it's size is roughly 2 MB
and contains roughly 50.000 lines.

Parsing it with bash takes a long time.

Is there any way to speed it up or is bash not the right tool for
parsing such big files?

All the best,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]