From: Andrew Bates (terhi.victor@logonet.com)
Date: Thu Jan 02 2003 - 01:00:43 EET
> Excellent!!! Does anybody know where I can find an example of a script
> that is doing just this read from stdin and write to stdout.
>
Here is a very simply perl script that reads and writes to the stdin/stdout:
#!/usr/bin/perl
# -- beginning of script
# display our message to the stdout
print "Testing ax25d\n";
print "Please enter your callsign: ";
# read input from the command line, until
# a carriage return is received
$call = (<>);
# remove the trailing carriage return
chomp $call;
# display callsign to the stdout
print "Hello ".$call."!\n";
exit;
# -- end of script
hope that helps, more information about perl can be found at www.perl.com...
other scripting languages (like korn shell) have howto's at the linux
documentation project (www.tldp.org). Any language that can communicate with
*nix's STDIN/STDOUT (C/C++, Java, ksh, sh, bash, perl, etc.) can be used for
AX25d processes.
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to jgskvdw.myvj@dcwis.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2b30 : Thu Jan 02 2003 - 01:11:25 EET