Currently we are doing the migration to unix to linux.
I am facing the new problem
kganeshb@its04489:~/scripts $ ls -l | more
total 340
-rw-r----- 1 kganeshb users 9038 Oct 22 13:23 109_db.txt
-rw-rw---- 1 dlc users 1413 Oct 10 17:40 1.txt
-rw-rw---- 1 kganeshb users 45 Jan 28 13:46 a
-rw------- 1 kganeshb users 197 Dec 26 13:19 aa
-rw-rw---- 1 kganeshb users 99 Jan 28 13:37 aaa
-rw-rw---- 1 kganeshb users 110 Jan 28 12:29 aaa.sh
-rw-r--r-- 1 kganeshb users 11146 Sep 29 15:36 aat.txt
-rw-rw---- 1 kganeshb users 58 Dec 29 19:03 aa.txt
-rw-rw---- 1 kganeshb users 639 Jan 8 11:48 add.sh
My script
if [ -r * ]
then
echo "read"
else
echo "non read"
fi
output
bash: [: too many arguments
non readable
Our most of the script using the -r * option.