Cory Petkovsek
Wed, 29 Jan 2003 14:23:28 -0800
Check this out: one-liners are possible in C!
--- Begin Message ---in no way, shape, or form is this -newbie.Carl Lowenstein wrote: > > From: "John H. Robinson, IV" <[EMAIL PROTECTED]> > > > > C one liners are _possible_, but they rely upon shell tricks. hardly > > newbie material. i have posted examples to kplug-list before, check the > > archives if you are interested. > > Are you sure you aren't thinking of awk one-liners rather than C. no, i mean C. [jaqque@athena:~]% /lib/ld-linux.so.2 =( gcc -o /dev/stdout -xc <(echo '#include <stdio.h>';echo 'main(){printf ("Hi, Mom!\n");return 0;};') 2>&1 ) Hi, Mom! note: the =() process substitution is something available only in zsh. i have never found a reliable way to make this trick work under bash. -john -- http://www.kernel-panic.org list archives http://www.ultraviolet.org To unsubscribe, send a message to the address shown in the list-unsubscribe header of this message.--- End Message ---