Not sure I see what this has to do with Perl advocacy. Questions of
this nature are better suited to beginners@[EMAIL PROTECTED]
and will generally
be better received there, though you need to do the proper amount of
homework before requesting someone provide you code.
http://learn.perl.org
Would be a place to start.
http://danconia.org
Colin Weaver wrote:
> this program in sh bourne ..
> works very well with my data file .OVEN
> this is it. but how would u write it in my beloved perl !
> #!/bin/sh
> if test $# -ne 2
> then
> echo ""
> echo Error: Usage: $0 OVEN
> echo ""
> exit 1
> fi
> if test ! -f $1
> then
> echo ""
> echo Error: File \'$1\' does not exist
> echo ""
> exit 2
> fi
>
> if test -z "`grep -i $2 $1 $6 $7 `"
> then
> echo ""
> echo Error: No records found for \'$2\'$6\'$7\' oven makers
> echo ""
> exit 3
> else
> echo ""
> echo List of ovens in \'$2\' in descending seat_capacity order
> echo ""
> grep -i $2 $1 | sort -b -n -k3
> echo ""
> fi
> exit 0
> colin_richard_weaver@[EMAIL PROTECTED]
>
>