Ignore Case in Shell

Hi

New to this Unix dot com.

I would like to know how i can ignore the case in filename which is getting as user directoty to shell script.

For Ex:

Source (/aa/bb/patch/)
Directory may contains more than 1 files as like

  1. aa.csv or Aa.csv or AA.csv or aa.CSV
  2. bb.csv
  3. cc.CSV

I need to copy aa.csv to destination directory(/app/gh/dest/).

Thanks in advance for your help...

Regards
AAH

In ksh you can ignore case several ways. Here is one:

$ ls Data daTa datA data
Data    daTa    datA    data
$ cat look
#! /usr/bin/ksh
target="data"
typeset -l lname
for name in * ; do
        lname=$name
        [[ $lname = $target ]] && echo $name
done
exit 0
$ ./look
Data
daTa
datA
data
$

Hi Everybody,

Can anyone help my users shared folder increase their space -- some of them has a cretical disk space 98% used space...

Please help us on how to increase their space nor any other way to prevent losing space from each folder..

Thanks you very.

The means I use to ignore case, as an example is the following snippet:

read -p "Enter Y/N to continue: " YN
y|Y|YES|Yes|n|N|NO|No=`echo $YN | tr [:lower:][:upper:]`

This allows anybody using your script to supply a response of any kind or
variation and it will be converted to an upper CASE respones i.e. Y or N!

Good luck!

:slight_smile: