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 09: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
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
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 (permalink)  
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 UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:53 AM.


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

Content Relevant URLs by vBSEO 3.2.0