Konrad Hinsen <[email protected]> skribis: > Hi Guix, > > this looks like a beginner's question, but I can't figure out how to do > this: list the files in a given package output, from the command line (I > do know how to do this in Guile). > > For a package with a single output, I can do > > ls -R $(guix build hello) > > For a package output other than "out", I can do > > ls -R $(guix build coreutils | grep debug) > > But what about coreutils:out? > > Cheers, > Konrad
Hi.
As the directory of the "out" output will have a shorter name, you could
sort the names by size and take the first one:
--8<---------------cut here---------------start------------->8---
for name in $(guix build coreutils); do printf "%d\t%s\n" "${#name}" "${name}";
done | sort -n | head -n 1 | cut -f 2
--8<---------------cut here---------------end--------------->8---
signature.asc
Description: PGP signature
