AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  AIX find command -ignore case

    Posted Tue February 15, 2011 07:43 PM

    Originally posted by: SystemAdmin


    I am having problems with the AIX 5.3 find command:

    find $HOME -name 'myfile.ini' -o name '*.txt' <-------I want the search to ignore case. How do I do this?

    -->Eventually the below ported to AIX is what I am going for:
    for file in `find -iname "myfile.ini" -o -iname ".txt"`
    do
    typeset -l strMyVar=""

    typeset -l strFileName=$(basename "$file")
    if ;
    then
    strMyVar=$(cat $file | grep -i "authority=")
    print $strMyVar >> ./mylogfile.txt
    fi
    done

    I sooo need the help on this....my confidence level on this is sinking fast.

    mapleman
    #AIX-Forum


  • 2.  Re: AIX find command -ignore case

    Posted Tue February 15, 2011 08:16 PM

    Originally posted by: SystemAdmin


    forgot to mention I am working in KSH
    #AIX-Forum


  • 3.  Re: AIX find command -ignore case

    Posted Tue February 15, 2011 11:16 PM

    Originally posted by: SystemAdmin


    find....|grep -i 'txt$'
    #AIX-Forum


  • 4.  Re: AIX find command -ignore case

    Posted Wed February 16, 2011 04:22 AM

    Originally posted by: shyhc


    find ... -name '[mM][yY][fF][iI][lL][eE].[iI][nN][iI]' -o -name '*.[tT][xX][tT]'
    ??
    #AIX-Forum


  • 5.  Re: AIX find command -ignore case

    Posted Wed February 16, 2011 11:10 AM

    Originally posted by: SystemAdmin


    Great,
    its work for me.

    this is good one, thanks a lot shyhc.
    __________________________________________
    Whenever you find yourself on the side of the majority,
    it is time to pause and reflect. (MARK TWAIN)
    http://www.aixcraft.com
    #AIX-Forum