Why not just do a count? $home/uv/bin/uv "COUNT VOC"

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, September 08, 2005 10:29 AM
Subject: RE: [U2] How to count records present in TYPE 30 file from unix 
shell prompt ??


<quote who="Rod Hills">
> How about executing a FILE.STAT-
>
> Let's say your universe account is at /u1/uv and you want a record count
> of the VOC.
>
> Then enter
> cd /u1/uv
> nrec=`echo "VOC" | /u1/uv/bin/file.stat | awk '/^Number of rec/{print
> $5}'`

For the awk-ward among us, the following works, too:
echo VOC |file.stat|head -n6|tail -n1|cut -f2 -d'='

Which could be assigned to a VAR with:
NREC=`echo VOC |file.stat|head -n6|tail -n1|cut -f2 -d'='`
echo $NREC or printf "$NREC\n"

My 2 bits.

Karl

>
> Hope that helps...
>
> Rod Hills
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Pankaj Gupta04
> Sent: Wednesday, September 07, 2005 10:51 PM
> To: [email protected]
> Subject: [U2] How to count records present in TYPE 30 file from unix
> shell prompt ??
>
> Hi,
>
> How to obtain the count of records present in TYPE 30 Universe file from
> Unix Shell prompt?
>
> One way to obtain the count of records for TYPE 30 file is give below.
>
> The command "/u1/uv/bin/uv "COUNT TYPE.30.FILE" | tail -n 1 | cut -f 1
> -d " "" can be executed on the shell prompt  for obtaining the count.
>
> Please provide an efficient solution for the above problem.
>
>
> Regards,
> Pankaj Gupta
> Infosys Technologies Limited - Pune
> Asia Pacific Operations
> *+91-20-2932800 Ext: 71403 DID: +91-20-22971403
> Cell: +91-93724-02008
> www.infosys.com <http://www.infosys.com/>
>
>
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely
> for the use of the addressee(s). If you are not the intended recipient,
> please
> notify the sender by e-mail and delete the original message. Further,
> you are
> not to copy, disclose, or distribute this e-mail or its contents to any
> other
> person and any such actions are unlawful. This e-mail may contain
> viruses.
> Infosys has taken every reasonable precaution to minimize this risk, but
> is
> not liable for any damage you may sustain as a result of any virus in
> this
> e-mail. You should carry out your own virus checks before opening the
> e-mail
> or attachment. Infosys reserves the right to monitor and review the
> content of
> all messages sent to or from this e-mail address. Messages sent to or
> from
> this e-mail address may be stored on the Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>


-- 
karl

     _/  _/      _/      _/_/_/       ____________   __o
    _/ _/       _/      _/    _/     ____________  _-\<._
   _/_/        _/      _/_/_/                     (_)/ (_)
  _/ _/       _/      _/           ......................
 _/   _/ arl _/_/_/  _/ earson    [EMAIL PROTECTED]

--
IT Director, ATS Industrial Supply, Inc.
http://www.atsindustrial.com
Toll-free: 800-789-9300 x29
Direct2Desk: 801-978-4429
Facsimile: 801-972-3888
--
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/ 
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to