09-20-2011
Oh, the blade()% ... is just whatever normally goes before the % prompt.
So basically, when nothing is wrong, the prompt would look like "blade () %"
, but after I execute my program, there is a "Cannot open", added to the "blade () %" and if I hit enter, the prompt will get back to "blade ()%".
9 More Discussions You Might Find Interesting
1. SuSE
keep getting an error when I try to revert to a snapshot:
"VMDB Failure" followed by "Unable to open snapshot file"
Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES.
Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies
2. IP Networking
Hi. I ran nmap on my server, and I get the following:
Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT
Interesting ports on -------- (-----):
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
6881/tcp open bittorrent-tracker
The... (0 Replies)
Discussion started by: Rledley
0 Replies
3. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
4. UNIX for Dummies Questions & Answers
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies
5. Solaris
I've a Sun V440 machine, and it's running solaris 10 .. for some reason i need to install a fresh copy of solaris 10. for that i've prepared solaris 10 dvd but surprisingly i found there is no any dvd rom on this machine, so i've took a dvd rom from a V240 machine and inserted on V440.
after... (3 Replies)
Discussion started by: Anti_Evil
3 Replies
6. Solaris
I keep getting "Too many open files" in /var/adm/messages that I do not know how to fix.
I've searched for solution on this forum and have increased the file descriptors limit but the problem persists.
The problem is happening in a solaris zone....
/var/adm/messages log example
May... (8 Replies)
Discussion started by: JT-KGY
8 Replies
7. UNIX for Advanced & Expert Users
We have a script that runs and picks up some files to later be used in Oracle. Every now and again we get a ERROR 'filename' file is open We know for a fact the files are not open. The files are created early morning and not used until the next morning by the script. If we manually open the file... (7 Replies)
Discussion started by: randybrazil
7 Replies
8. Shell Programming and Scripting
Hi All,
i am trying to ssh to a remote machine and execute certain command to remote machine through script.
i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as
expect: spawn id exp5 not open
while executing
"expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies
9. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
close(n) Tcl Built-In Commands close(n)
__________________________________________________________________________________________________________________________________________________
NAME
close - Close an open channel
SYNOPSIS
close channelId
_________________________________________________________________
DESCRIPTION
Closes the channel given by channelId.
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.
All buffered output is flushed to the channel's output device, any buffered input is discarded, the underlying file or device is closed,
and channelId becomes unavailable for use.
If the channel is blocking, the command does not return until all output is flushed. If the channel is nonblocking and there is unflushed
output, the channel remains open and the command returns immediately; output will be flushed in the background and the channel will be
closed when all the flushing is complete.
If channelId is a blocking channel for a command pipeline then close waits for the child processes to complete.
If the channel is shared between interpreters, then close makes channelId unavailable in the invoking interpreter but has no other effect
until all of the sharing interpreters have closed the channel. When the last interpreter in which the channel is registered invokes close,
the cleanup actions described above occur. See the interp command for a description of channel sharing.
Channels are automatically closed when an interpreter is destroyed and when the process exits. Channels are switched to blocking mode, to
ensure that all output is correctly flushed before the process exits.
The command returns an empty string, and may generate an error if an error occurs while flushing output. If a command in a command pipe-
line created with open returns an error, close generates an error (similar to the exec command.)
EXAMPLE
This illustrates how you can use Tcl to ensure that files get closed even when errors happen by combining catch, close and return:
proc withOpenFile {filename channelVar script} {
upvar 1 $channelVar chan
set chan [open $filename]
catch {
uplevel 1 $script
} result options
close $chan
return -options $options $result
}
SEE ALSO
file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3)
KEYWORDS
blocking, channel, close, nonblocking
Tcl 7.5 close(n)