l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Oct 04 09:37

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] help with script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] help with script

excellent, mike!  thanks.

question -- is it possible to automatically apply a perl script to the
body within mutt?

or perhaps using procmail:

:0 H:
* ^Subject:.*[Pp]hys.*105[aA][lL].*
| mikes_script.pl | 105

i don't know if you can have two pipes on a procmail action line.  guess
i'll have to fiddle around to find the most convenient way of doing

thanks for the tip!

begin msimons@moria.simons-clan.com <msimons@moria.simons-clan.com> 
> On Thu, Oct 03, 2002 at 12:16:19AM -0700, Peter Jay Salzman wrote:
> > i'm allowing my students to turn in their assignments electronically
> > this quarter.  they're writing C or fortran programs.  i'm requiring
> > them to turn in:
> > 
> > 1. the program
> > 2. a file showing the compile process and the program output.
>   My recommendation is require that the students turn in a Makefile 
> with well defined targets... like:
> ===
> make clean   - this must remove all temporary files created using 
>                any other make targets
> make all     - this must compile your program from a clean state
> make test    - this must run your program with sample input files
>                "FOO, BAR, BAZ"
> ===
>   Have them turn in a raw "script" output showing them run only the 
> following command: "make clean; make all; make test"... so that
> you can see what they "see".
> ... if these students don't know make, then maybe you can supply them
> with a makefile and tell them what sections to change?
> > for #2, i'm having them use "script".
>   If the makefile isn't okay.
>   It will likely take you much less time to strip out the terminal
> crap generated on your end, than it will to write a good shell.
>   The perl crud below is something I put together quickly for my own 
> purposes... which mostly works the 'cat -A' gets all extra special
> characters on the screen.
> perl -ne 'while (s/[^\b][\b] [\b]//g) {}; # remove simple backspaces
>           s/\e\[[\d;?]*[a-zA-Z\@]//g;     # kill most vt100 escapes
>           s/\e\]0;[^\a]+\a//;             # kill vt100 title bar text
>           s/[\b]//g;                      # kill other backspaces
>           s/\r\n/\n/;                     # strip last carriage return
>           s/^.*\r//g;                     # nuke text before remaining cr
>           s/\a//g;                        # nuke bells
>           print' 
> test | cat -A | less
> ===
> ps:
>   The only lines that don't really work well are the "backspace"
> handling ones... because on a '^H' moves the cursor left display
> without removing the character... so when someone arrows to the
> left a bunch of ^H are logged.  This doesn't track where someone
> moves.
> ===
> > i can write a script that presents a shell like interface which short
> > circuits this stuff saves their program output to a file, but if
> > something is already written, i'd rather go that route.
>   You are basically thinking about writing a shell...
>   Unless you have spare time, I would just recommend you continue to 
> have them use script... since you won't need to spend time developing
> something and handling random support issues (maybe like "why doesn't vi
> work inside this thing", "why doesn't ^R do a reverse search of my history", 
> "why doesn't ESC0/^A go to the beginning of line", etc).
>   TTFN,
>     Mike
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.