Commit 2c2a4f66 authored by gsell's avatar gsell
Browse files

scripts/Bootstrap/Pmodules/modulecmd.in: redirect output of sub-command...

scripts/Bootstrap/Pmodules/modulecmd.in: redirect output of sub-command 'search' to stderr if option '--print-modulefiles' is used
parent c537be0e
...@@ -881,11 +881,11 @@ subcommand_search() { ...@@ -881,11 +881,11 @@ subcommand_search() {
sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2 sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2
else else
while read -a line; do while read -a line; do
echo -n "${line[2]}/" echo -n "${line[2]}/" 1>&2
for d in "${line[@]:3}"; do for d in "${line[@]:3}"; do
echo -n "$d/" echo -n "$d/" 1>&2
done done
echo "${line[0]}" echo "${line[0]}" 1>&2
done < <(sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}") done < <(sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}")
fi fi
rm -f "${tmpfile}" rm -f "${tmpfile}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment