08-03-2018
Just enclosed $cmdname in double quotes and it worked!
Many thanks!
Last edited by wbport; 08-03-2018 at 01:30 PM..
Reason: Tried suggestion
5 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a recent file I am trying to parse that looks like this:
value_one:1:value_two:2:value_three:3
value_one matches to 1
value_two matches to 2
value_three matches to 3
the semi-colons not only seperate the tags to their corresponding values, but also seperate tag/value pairs from... (2 Replies)
Discussion started by: mike@freddiemac
2 Replies
2. What is on Your Mind?
Robot fever is there throughout the world ! :b: (3 Replies)
Discussion started by: matrixmadhan
3 Replies
3. Red Hat
I am looking to take the Redhat Certification exam, and one of the guidelines is:
Can someone tell me what star is? Thank you. (2 Replies)
Discussion started by: druidmatrix
2 Replies
4. UNIX for Dummies Questions & Answers
I need to replace the (*) in the fist of a list with numbers using sed for example >
this file contain a list
* linux
* computers
* labs
* questions
to >>>>
this file contain a list
1. linux
2. computers
3. labs
4. questions (7 Replies)
Discussion started by: aalbazie
7 Replies
5. Solaris
It's been a few years since this topic was last asked and answered.. curious whether anyone knows if the landscape has improved?
looking for a more modern release of OpenOffice / LibreOffice / etc than the OOo-3.3 version mentioned in earlier posts from 2012. Would prefer not to compile from... (1 Reply)
Discussion started by: Yeaboem
1 Replies
RCMDSH(3) BSD Library Functions Manual RCMDSH(3)
NAME
rcmdsh -- return a stream to a remote command without superuser
SYNOPSIS
#include <unistd.h>
int
rcmdsh(char **ahost, int inport, const char *locuser, const char *remuser, const char *cmd, const char *rshprog);
DESCRIPTION
The rcmdsh() function is used by normal users to execute a command on a remote machine using an authentication scheme based on reserved port
numbers using rshd(8) or the value of rshprog (if non-NULL).
The rcmdsh() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise *ahost is set to
the standard name of the host and a connection is established to a server residing at the well-known Internet port ``shell/tcp'' (or whatever
port is used by rshprog). The parameter inport is ignored; it is only included to provide an interface similar to rcmd(3).
If the connection succeeds, a socket in the UNIX domain of type SOCK_STREAM is returned to the caller, and given to the remote command as
stdin, stdout, and stderr.
RETURN VALUES
The rcmdsh() function returns a valid socket descriptor on success. Otherwise, -1 is returned and a diagnostic message is printed on the
standard error.
SEE ALSO
rsh(1), socketpair(2), rcmd(3), rshd(8)
BUGS
If rsh(1) encounters an error, a file descriptor is still returned instead of -1.
HISTORY
The rcmdsh() function first appeared in OpenBSD 2.0, and made its way into FreeBSD 5.0.
BSD
September 1, 1996 BSD