9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* plan9 sed
@ 1996-04-09 19:36 none
  0 siblings, 0 replies; 2+ messages in thread
From: none @ 1996-04-09 19:36 UTC (permalink / raw)


cpp a.c|sed -n '/^#line/s/.*"(.*)".*/\1/p'|sort -u






^ permalink raw reply	[flat|nested] 2+ messages in thread

* plan9 sed
@ 1996-04-09 19:09 Min
  0 siblings, 0 replies; 2+ messages in thread
From: Min @ 1996-04-09 19:09 UTC (permalink / raw)


Hi:
	I tried to convert the following Unix script to Plan9 script.
	In Unix, I got the following Unix Output File.
	I have a problem to get plan9 script to work.       

	Thank you very much

************** Unix script *************************************************
	eval cc -E a.c | sed -n -e 's%^# [1-9][0-9]* "\./\(.*\)".*$%\1%p' -e 's%^# [1-9][0-9]* "\(.*\)".*$%\1%p' | sort -u 
******************************************************************************

************** Plan9 script *************************************************
        eval pcc -E a.c | sed -n -e 's%^# [1-9][0-9]* "\./\(.*\)".*$%\1%p' -e 's%^# [1-9][0-9]* "\(.*\)".*$%\1%p' | sort -u 
******************************************************************************

************** a.c *************************
#include <stdio.h>
#include <stdlib.h>

main()
{
        printf("Hello Horus\n");
}
********************************************

************ Unix Output File **************
/usr/include/stdio.h
/usr/include/stdlib.h
/usr/include/sys/stdtypes.h
a.c
********************************************








^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-04-09 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-09 19:36 plan9 sed none
  -- strict thread matches above, loose matches on Subject: below --
1996-04-09 19:09 Min

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).