I've just started writing my own basg script so i;m kinda new to this all.
My script is going though some directories using a while loop.
In the llop i do an ls command but in some direcotries it gives back an error. That is just becuase there are no file matching the pattern (no files at all.
How can you supprees those errors? The errors mess up all my echo commands because i use echo -n some times.
This i a small example:
# Make the dir list to go trough
find -print0 | \
xargs -0 file | \
grep ' directory' | \
cut -f 1 -d : | \
cut -c 3- | \
while read cat_dir ; do
# Aanmaken van het profiel
cat_profile=`ls -1 *001.jpg | rev | cut -c 8- | rev`