You can use diff -i or –ignore-case options to ignore ‘case’ differences ‘in’ file contents.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
## ignore case differences in file contents echo -e "one\nTWO\nthree" > myfile1 ## create some files echo -e "one\ntwo\nthree" > myfile2 diff myfile1 myfile2 ## normal comparision ## returns ## 2c2 ## < TWO ## --- ## > two diff -i myfile1 myfile2 ## ignore case in file contents ## returns nothing as ignore case flag is on rm -r my* |