I have a linux script that gets an argument passed to it that originates from MSDOS (actually DOSEMU running MS DOS 6.22). The argument that gets passed is case insensitive (as DOS didn't do cases) but of course Linux does.
I am trying to get from the following passed argument
if [ ! -z "$2" ]; then
find / -readable -ipath $1 2>&1 | grep -v "Permission denied" | while IFS= read -r FILE; do
lpr -o Collate=True -#$copies -sP $FILE
You can use
-ipath option of
find for ignore case path matching:
# assuming $arg contains path argument supplied find . -ipath "*$arg*"