[comp.mail.mh] scan and format files

drew@cgou11.enet.dec.com (Steve Drew) (04/19/91)

--


I was hoping to be able to create a format file for 'scan' 
that displayed only the last n characters of the from address
instead of just displaying the first n characters.
	
For example a message received from a ALLIN1/DECNET system could then
be displayed as:

1   1454 ako::Fred.Smith   Mon Mar 25 11:11  test message

	rather than

1   1454 kaoo01::mrgate::F Mon Mar 25 11:11  test message

                        ^
                        from users name not seen.
                        
There doesnt seem to be any supporting syntax in the mh-format
commands for this.

Anyone have any ideas?

thanks.

	Steve.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Drew: drew%cgou11.enet@decwrl.dec.com
Phone     : 403-295-HELP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    

jromine@yoyodyne.ics.uci.edu (John Romine) (04/19/91)

drew%cgou11.enet@decwrl.dec.com writes:
>I was hoping to be able to create a format file for 'scan'
>that displayed only the last n characters

I think you can right justify a field by using a negative
width argument.  E.g.,

	%-10{from}

You'd have to use one of the match tests to see if the address
is a DECNET-style address, and then use this format in those cases.
--
John Romine

drew@cgou11.enet.dec.com (Steve Drew) (04/20/91)

In article <280E317E.17300@ics.uci.edu>, jromine@yoyodyne.ics.uci.edu (John Romine) writes:

>I think you can right justify a field by using a negative
>width argument.  E.g.,
>
>	%-10{from}
>

    Nope, still gives first ten characters, and not the last 10.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Drew: drew%cgou11.enet@decwrl.dec.com
Phone     : 403-295-HELP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~