hi.
i´m working in bash and am trying to create a Perl daemon that controls bash´s behavior. this is actually in preparation for a later project i´ll be working on.
basically, i´m looking for a way to have the Perl daemon tell bash what to do. i already have a small daemon that simply prints... (2 Replies)
I'm getting rather frustrated with an interactive script I'm writing.
The script is divided up, with section for setting variable at the top, then functions (which make up most of the script) then basically a line at the end which calls the first function- the program moves between the... (5 Replies)
in a ksh script, i want to process
some string variables using awk,
and then i want to go on using this variables
in the same ksh (out of awk lines)
can anybody send me a very simple example about this? (0 Replies)
Hi all,
I'm having a rather peculiar problem involving parameter passing with declared functions in my shell script. Hope to get some advice here.
A brief description of my code is as follows:
However, I'm not getting the results I wanted. If I pass in $rdir, I'm going to end up... (4 Replies)
Hi,
I was trying to customize this archaic HP-UX box. only shell available is ksh and that too seems to be pretty old and doesn't completely conform to what I read on the web about ksh. Anyway here are my issues:
- I wanted to have a dynamic title on xterm or dtterm. I put the following lines... (2 Replies)
As you are probably aware, $# indicates the number of parameters passed into a korn shell script. But this appears to hang around for
sunsequent runs...????
A simple script:-
#!/usr/bin/ksh
echo "#parameters $#"
echo "\$1 $1"
echo "\$2 $2"
I run the script with 0 parameters (all fine)
#... (7 Replies)
Hello,
I would like to understand this... I'm using ksh and doing
(( z = y - 1 ))
if y=34, then the result for z is 33, but if y=034 the result is z=27. Why??
Thanks (15 Replies)
Hi All,
I got a strange problem here. I have a perl script which is fetching data from a database table and writing a file with that data.
If i run that script from linux command line, the file it creates is a normal ascii text file without any binary character in it.But... (9 Replies)
Hi,
I have a strange problem with arrays in Perl.
That is to say, for me it is strange and perhaps there is a special reason for it that I do not know of.
Not a real Perl Ace.
This is the program, as an example:
#!/usr/bin/perl -w #-d
use strict;
my $pu;
my $pu_list_cmd;
my... (2 Replies)
Discussion started by: ejdv
2 Replies
LEARN ABOUT OPENSOLARIS
eof
eof(1T) Tcl Built-In Commands eof(1T)__________________________________________________________________________________________________________________________________________________NAME
eof - Check for end of file condition on channel
SYNOPSIS
eof channelId
_________________________________________________________________DESCRIPTION
Returns 1 if an end of file condition occurred during the most recent input operation on channelId (such as gets), 0 otherwise.
ChannelId must be an identifier for an open channel such as a Tcl standard channel (stdin, stdout, or stderr), the return value from an
invocation of open or socket, or the result of a channel creation command provided by a Tcl extension.
EXAMPLES
Read and print out the contents of a file line-by-line:
set f [open somefile.txt]
while {1} {
set line [gets $f]
if {[eof $f]} {
close $f
break
}
puts "Read line: $line"
}
Read and print out the contents of a file by fixed-size records:
set f [open somefile.dat]
fconfigure $f -translation binary
set recordSize 40
while {1} {
set record [read $f $recordSize]
if {[eof $f]} {
close $f
break
}
puts "Read record: $record"
}
SEE ALSO file(1T), open(1T), close(1T), fblocked(1T), Tcl_StandardChannels(3TCL)KEYWORDS
channel, end of file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWTcl |
+--------------------+-----------------+
|Interface Stability | Uncommitted |
+--------------------+-----------------+
NOTES
Source for Tcl is available on http://opensolaris.org.
Tcl 7.5 eof(1T)