The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 11:23 AM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
screen throws "permission denied" miechu Shell Programming and Scripting 6 10-24-2006 09:17 PM
simple Unix Execute permission for "others" jsudha HP-UX 1 07-26-2004 03:45 PM
how to request a "read" or "delivered" receipt for mails plelie2 Shell Programming and Scripting 1 08-06-2002 03:26 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2008
lokiman lokiman is offline
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
  #2 (permalink)  
Old 02-09-2008
HPAVC's Avatar
HPAVC HPAVC is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 106
look at the output of "ls -l" and awk off the read/write bytes.
Sponsored Links
Closed Thread

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 07:09 AM.


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