The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"find command" to find the files in the current directories but not in the "subdir" swamymns Shell Programming and Scripting 9 07-22-2008 08:23 AM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 10:52 PM
screen throws "permission denied" miechu Shell Programming and Scripting 6 10-24-2006 06:17 PM
simple Unix Execute permission for "others" jsudha HP-UX 1 07-26-2004 12:45 PM
how to request a "read" or "delivered" receipt for mails plelie2 Shell Programming and Scripting 1 08-06-2002 12:26 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-09-2008
Registered User
 

Join Date: Feb 2008
Posts: 14
Arrow Awk - to test multiple files "read" permission ?

Hi Masters,

Iam new to this Forum and this is my first post.

My question is:

I've some datafiles belongs the type (A, B, C) in the location 'export/home/lokiman '

dataA1.txt
dataB28.txt
dataC35.txt

1) I've to check the read permission for each file, if it not there then I've to that print the file name and exit.

2) If the read permission present, then I've to copy the data contents into one output file "output.txt".

3) Also I've to check for the file types (A, B, C) for the datafiles. Atleast one file should be present for each type. Otherwise script should abort.

This can be done by shell script using multiple steps. But now the requirement is to through "AWK".

I know this is time consuming and challenging. But I would appreciate for even your small help in this regard.

Cheers ~~/Lokiman
Reply With Quote
Forum Sponsor
  #2  
Old 02-09-2008
HPAVC's Avatar
Registered User
 

Join Date: Feb 2008
Posts: 105
look at the output of "ls -l" and awk off the read/write bytes.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0