есть некий код
пробуем запускать
sh use deadbeef ololo
old: media-sound/deadbeef ape converter dts hotkeys psf src supereq alac curl shellexec cover cover-imlib2 mms lastfm wma zip pltbrowser m3u
new: /deadbeef ololo
запускаем иначе
./use deadbeef ololo
old: media-sound/deadbeef ape converter dts hotkeys psf src supereq alac curl shellexec cover cover-imlib2 mms lastfm wma zip pltbrowser m3u
new: media-sound/deadbeef ape converter dts hotkeys psf src supereq alac curl shellexec cover cover-imlib2 mms lastfm wma zip pltbrowser m3u ololo
но!
ls -lh /bin/sh
lrwxrwxrwx 1 root 0 4 янв 24 06:00 /bin/sh -> bash
sh --version
GNU bash, version 4.2.45(1)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
find_category(){
source "/etc/make.conf" 2>/dev/null
source "${PORT_ETC}/make.conf" 2>/dev/null
[[ -z "${PORTDIR}" ]] && PORTDIR="/usr/portage"
if [[ -n "$(eix -V 2>/dev/null)" ]];then
PORTDIR_OVERLAY="$(eix --print PORTDIR_OVERLAY)"
else
export "$(grep "^PORTDIR_OVERLAY=" <<< "$(emerge --info 2>/dev/null)" | tr -d \")"
fi
for target in ${PORTDIR} ${PORTDIR_OVERLAY};do
categories+="$(ls -d1 ${target}/{*-*,virtual} 2>/dev/null)"$'\n'
done
categories="$(sed '/^$/d' <<< "${categories}" 2>/dev/null)"
while read line;do
if [[ -d "${line}/${atom}" ]];then
category+="${line##*/}"$'\n'
fi
done <<< "${categories}"
echo "${category}"
}
какого!?