03-30-2011
grep <string> $TMPFILE
cat $TMPFILE | sed '/<string>/!d'
cat $TMPFILE | sed -n '#p' ---> # refers to the line number
10 More Discussions You Might Find Interesting
1. IP Networking
:confused: HI,
We have 2 servers ( win 2003 + sun 5.8 ) and we run a rsh from the NT to the UNIX.
The program runs a shell script on the UNIX and waits for the answer in the EOF.
How ever, after period of appx 2 min there is a reply "Recv failed:Connection reset by peer".
while the... (5 Replies)
Discussion started by: eyalush
5 Replies
2. HP-UX
Hi All... I'm newbie here...,
i have problem when installing oracle9206, i use HPUX 11.11,
i'm using Xmanager enterprise 2.1 for forwarding from server A to my laptop
# export DISPLAY=192.168.1.239:0.0
# echo $DISPLAY
output ==> 192.168.1.239:0.0
at the oracle directory, i execute ... (3 Replies)
Discussion started by: grimanda
3 Replies
3. Shell Programming and Scripting
I use ssh to work on the server (OS X 10.4.x) remotely from home (Debian / OS X 10.5.3). If I leave my machine idle, I get disconnected after a couple of minutes. I get the following error message:
Read from remote host "server name": Connection reset by peer
Connection to "server name" closed.... (2 Replies)
Discussion started by: osxhawk
2 Replies
4. Shell Programming and Scripting
hi
i am connecting to a remote server using sftp protocol.
i am using the command like "sftp USER01@122.10.12.45"
then i got the error "Couldn't read packet: Connection reset by peer"
please help its very urgent (5 Replies)
Discussion started by: Satyak
5 Replies
5. IP Networking
hi all.
am running postgresql in a vm on debian server.
i have some client programs connecting to the db.
when i check the logs of postgresql i see "connection reset by peer"
can someone help me with this issue...
thanks. (1 Reply)
Discussion started by: coolatt
1 Replies
6. UNIX for Advanced & Expert Users
Hello
I'm facing the above problem while doing a performance run. I've a script which I'm launching from my windows desktop using mozilla. The script will invoke backend action on a Solaris host which in turn feeds the records to a driver located on a linux box(Cent OS).
What's happening is... (1 Reply)
Discussion started by: subramanyab
1 Replies
7. UNIX for Dummies Questions & Answers
I get this error when I log in through console:
"fatal: Read from socket failed: Connection reset by peer".
Can you tell me what this is and why it happens, and how to stop it? Thank you. (1 Reply)
Discussion started by: iamnew2solaris
1 Replies
8. UNIX for Dummies Questions & Answers
Hi ,
when i run ,
tkt=/u01/ctrlfile/tkt.tmp
grep "TICKET NBR" $cdrFile | head -$count | tail -1 > $tkt
i got error
grep: writing output: Connection reset by peer
but some time its working withour error its working fine but some time i got this error
any help please (5 Replies)
Discussion started by: OTNA
5 Replies
9. UNIX for Dummies Questions & Answers
Hello to all,
i have a problem when trying to estabilish a sftp connection.
i setup a sftp server (i used feeFTPd) and i'm now trying to connect from two different machines.
from the first one everything is fine:
$ sftp -vvv user@xxx.xxx.xxx.xxx
Connecting to xxx.xxx.xxx.xxx...... (9 Replies)
Discussion started by: dc26
9 Replies
10. Red Hat
Hi Guys,
I can't SSH to a remote system - connection reset by peer..any ideas ?
-The Source is Linux, the Remote is Windows
-The remote has OpenSSH running on Port 22 - Telnet confirms port is open
-User1 has a RSA2 Key (2048) key, which is capture in the 1010101-pub.key specified by the... (1 Reply)
Discussion started by: stevie_velvet
1 Replies
LEARN ABOUT REDHAT
mktemp
MKTEMP(1) BSD General Commands Manual MKTEMP(1)
NAME
mktemp -- make temporary file name (unique)
SYNOPSIS
mktemp [-d] [-q] [-u] template
DESCRIPTION
The mktemp utility takes the given file name template and overwrites a portion of it to create a file name. This file name is unique and
suitable for use by the application. The template may be any file name with at least 6 of 'Xs' appended to it, for example /tmp/temp.XXXXXX.
The trailing 'Xs' are replaced with the current process number and/or a unique letter combination. The number of unique file names mktemp
can return depends on the number of 'Xs' provided; six 'Xs' will result in mktemp testing roughly 26 ** 6 combinations.
If mktemp can successfully generate a unique file name, the file is created with mode 0600 (unless the -u flag is given) and the filename is
printed to standard output.
OPTIONS
The available options are as follows:
-d Make a directory instead of a file.
-q Fail silently if an error occurs. This is useful if a script does not want error output to go to standard error.
-u Operate in ``unsafe'' mode. The temp file will be unlinked before mktemp exits. This is slightly better than mktemp(3) but still
introduces a race condition. Use of this option is not encouraged.
RETURN VALUES
The mktemp utility exits with a value of 0 on success, and 1 on failure.
EXAMPLES
The following sh(1) fragment illustrates a simple use of mktemp where the script should quit if it cannot get a safe temporary file.
TMPFILE=`mktemp /tmp/$0.XXXXXX` || exit 1
echo "program output" >> $TMPFILE
In this case, we want the script to catch the error itself.
TMPFILE=`mktemp -q /tmp/$0.XXXXXX`
if [ $? -ne 0 ]; then
echo "$0: Can't create temp file, exiting..."
exit 1
fi
Note that one can also check to see that $TMPFILE is zero length instead of checking $?. This would allow the check to be done later one in
the script (since $? would get clobbered by the next shell command).
SEE ALSO
mkstemp(3), mktemp(3)
HISTORY
The mktemp utility appeared in OpenBSD.
BSD
November, 20, 1996 BSD