The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > SuSE
.
google unix.com



SuSE SUSE Linux is a major operating system. The developer rights are owned by Novell, Inc.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script for Finding files in a folder and copying to another folder satish2712 Shell Programming and Scripting 5 09-11-2008 05:07 PM
Auto copy for files from folder to folder upon instant writing Bashar UNIX for Advanced & Expert Users 2 08-21-2008 03:44 PM
Moving Files from one folder to another folder farooqpervaiz Shell Programming and Scripting 10 08-07-2008 03:20 AM
Shell script that would check if the CD-rom is readable eamani_sun Shell Programming and Scripting 1 05-13-2008 07:54 PM
simple check to see if a folder exists psyman Shell Programming and Scripting 4 09-27-2007 02:15 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-30-2009
kingganesh04 kingganesh04 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 40
Regarding Readable check for all the files in the folder

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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0