[HPADM] SUMMARY: directory search script needed ... : UNCLASS

From: Goncheroski, Joseph J., OIG DoD (jgonch@dodig.osd.mil)
Date: Wed Oct 06 2004 - 08:34:52 EDT


                          UNCLASSIFIED DOCUMENT
original question:
 
not much on scripting and in need of a script to search directory "/abc/xyz"
for filename "joesfile" and if it is found, store it's file size in a
variable "filesize".
 
any help is appreciated.
 
thanks ... joseph
 
 
my thanks to:
 
john adams
alan riggs
bob scharle
niall grimes
brett geer
kevin o'donovan
jim turner
cor vermeulen
bertrand hutin
magnus andersen
corne beerse
sundararajan swaminathan
david lee totsch
balaji narayanan
david lodge
robert dill
 
after struggling with punctuation, i used the following to take care of my
search need, where joesfile is always in directory /abc/xyz:
    
        filesize=$(ll /abc/xyz/joesfile | awk `{print $5}`)
 
thanks again ... joseph
 
                          UNCLASSIFIED DOCUMENT

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:43 EDT