Another thing you can do is: do the echo from within the script, not after it finished, to see if it is set to the value you want from ls/grep. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20230605/34bcf2fd/attachment.htm>