hi @cscs - it works for me too… sometimes… and sometimes not - i get the errors probably 2 of 5 runs or so regardless of whether the -- is there
here’s an excerpt from the script…
a=(
''
'WARNING: There were issues with this file.'
'Open the relevant files for viewing? [Y/n]'
)
printf '%s\n' "${a[@]}"
read -rsN1
if [[ "${REPLY}" != 'n' ]] ; then
# running kate with '&> '/dev/null' & disown' sometimes results in random erroneous errors such as...
# ./wpc.sh: line N: isown: command not found
# see: https://invent.kde.org/utilities/kate/-/issues/113#note_780703
kate -- 'errors.txt' "${sFile}" &> '/dev/null' & disown
#stty 'sane'
printf '%s\n' 'Press any key to continue...'
read -rsN1
fi
the error “isown: command not found” is random - that only happened once - other times the ‘not found’ commands are random characters from the script, all of which are located after the kate command i believe so i’m not sure you’d see the errors in a 1 line script
if you decide to test further, be careful because bash tries to exec the characters
I tend to agree with the comment in the link provided - the issue is likely found in your script - most probably a variable having unexpected content.
When a program - in this case a script - mishaves when provided with arguments - then validate the input.
Of course you have likely thought of it - so just for the record - add a line printing the command before the actual execution will provide hints as to what is eating the d
echo kate -- 'errors.txt' "${sFile}" &> '/dev/null' & disown