Thanks Don and Germany. This is the right train of thought.
To get it to work I had to escape the string that sets the terminal title. Like this...
*Note: This escaped string cannot be at the end of the $prompt string. You'll notice a space character after the escaped string in the example above. If you don't want that last space character, put the escaped string in front...
Hi,
I am having nightmare issue-ing remote ssh command from a CGI perl script.
It just won't run on debug message: It says permission denied. Can I even do this? as the apache server running under DAEMON account probably can't execute it? Is this the case of what's going on?
Here is my... (3 Replies)
Hi all,
I am facing the following issue:
Host A should execute a remote command (say pwd) on host B2.
B2 is not directly reacheable but you have to connect from a to B1, then from B1 you can execute the command ssh user@B2 pwd.
B1 and B2 are directly connected:
A => B1 => B2
| ... (3 Replies)
Hi all,
Today I want to write a script to run the commands remotely.
If I run the command as follows:
ssh <user>@<ip> 'ls; pwd'
it works fine.
But when I want to use ssh to set view in clearcase, it will lose the response. as follows
ssh <user>@<ip> 'cleartool setview <view_name>; pwd'... (1 Reply)
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
Hi I have a perl command that doesn't seem to be working correctly. It appears to be fine but even when i try and run it manually same thing. Can someone take a look at this and tell me what they think the problem could be?
Here is the perl Line:
system ("echo 'ssh -t -t $user\@$_ \"cd... (3 Replies)
Hi
The command below does not work as it require to take command in the breakers
But If I do so the variable values get lost
ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary -inactive -fromd="${BACKUP_DATE}"'
Thank you. (3 Replies)
How should i make the following code working
#!/bin/bash
INPUTFILE="test.txt"
while read STRING; do
IP=`host -t A $STRING | awk '{print $NF}'`
HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"`
echo $HOSTNAME > out.txt
done < $INPUTFILE
At this moment while... (3 Replies)
Hi,
My goal is to connect from unix server A to windows server B and call a bat file on windows.
I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success.
Can you please help me in... (4 Replies)
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
LEARN ABOUT FREEBSD
fparseln
FPARSELN(3) BSD Library Functions Manual FPARSELN(3)NAME
fparseln -- return the next logical line from a stream
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <stdio.h>
#include <libutil.h>
char *
fparseln(FILE *stream, size_t *len, size_t *lineno, const char delim[3], int flags);
DESCRIPTION
The fparseln() function returns a pointer to the next logical line from the stream referenced by stream. This string is NUL terminated and
it is dynamically allocated on each invocation. It is the responsibility of the caller to free the pointer.
By default, if a character is escaped, both it and the preceding escape character will be present in the returned string. Various flags
alter this behaviour.
The meaning of the arguments is as follows:
stream The stream to read from.
len If not NULL, the length of the string is stored in the memory location to which it points.
lineno If not NULL, the value of the memory location to which is pointed to, is incremented by the number of lines actually read from the
file.
delim Contains the escape, continuation, and comment characters. If a character is NUL then processing for that character is disabled. If
NULL, all characters default to values specified below. The contents of delim is as follows:
delim[0] The escape character, which defaults to , is used to remove any special meaning from the next character.
delim[1] The continuation character, which defaults to , is used to indicate that the next line should be concatenated with the
current one if this character is the last character on the current line and is not escaped.
delim[2] The comment character, which defaults to #, if not escaped indicates the beginning of a comment that extends until the end
of the current line.
flags If non-zero, alter the operation of fparseln(). The various flags, which may be or-ed together, are:
FPARSELN_UNESCCOMM Remove escape preceding an escaped comment.
FPARSELN_UNESCCONT Remove escape preceding an escaped continuation.
FPARSELN_UNESCESC Remove escape preceding an escaped escape.
FPARSELN_UNESCREST Remove escape preceding any other character.
FPARSELN_UNESCALL All of the above.
RETURN VALUES
Upon successful completion a pointer to the parsed line is returned; otherwise, NULL is returned.
The fparseln() function uses internally fgetln(3), so all error conditions that apply to fgetln(3), apply to fparseln(). In addition
fparseln() may set errno to ENOMEM and return NULL if it runs out of memory.
SEE ALSO fgetln(3)HISTORY
The fparseln() function first appeared in NetBSD 1.4 and FreeBSD 4.0.
BSD December 1, 1997 BSD