From 2c2a4f669d68382d250f9c5eb0b54bc165027d90 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 17 Mar 2015 10:05:25 +0100 Subject: [PATCH] scripts/Bootstrap/Pmodules/modulecmd.in: redirect output of sub-command 'search' to stderr if option '--print-modulefiles' is used --- scripts/Bootstrap/Pmodules/modulecmd.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Bootstrap/Pmodules/modulecmd.in b/scripts/Bootstrap/Pmodules/modulecmd.in index ba1a5f2..bc47ba7 100755 --- a/scripts/Bootstrap/Pmodules/modulecmd.in +++ b/scripts/Bootstrap/Pmodules/modulecmd.in @@ -881,11 +881,11 @@ subcommand_search() { sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}" 1>&2 else while read -a line; do - echo -n "${line[2]}/" + echo -n "${line[2]}/" 1>&2 for d in "${line[@]:3}"; do - echo -n "$d/" + echo -n "$d/" 1>&2 done - echo "${line[0]}" + echo "${line[0]}" 1>&2 done < <(sort -k 1,1 -k 4,4 -k 5,5 "${tmpfile}" | awk "${with_modules}") fi rm -f "${tmpfile}"