Sponsored Content
Full Discussion: Can't rcmd with star name
Top Forums Shell Programming and Scripting Can't rcmd with star name Post 303021056 by wbport on Friday 3rd of August 2018 10:02:12 AM
Old 08-03-2018
This morning I tried it again with "ls -l /dir1/dir2/FILEONE*" and that shows up at the top of the log. If I sent it to bb123456, what comes back is
Code:
ls: /dir/dir2/FILEONE-998877.txt not found: No such file or directory (error 2)

That file does not exist on this computer--the remote computers compress it with other files to send it to us. That file does exist on bb998877, though.

I have tried enclosing the entire command in single quotes and double quotes in separate tests. What I get is
Code:
sh: ls /dir1/dir2/FILEONE*:not found

and at linux branches the "sh" is replaced by "bash".

Thanks for looking at it.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parsing a STAR tag-value file

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?

Did you watch Super Star (Thalaivar's) Endhiran Movie?

Robot fever is there throughout the world ! :b: (3 Replies)
Discussion started by: matrixmadhan
3 Replies

3. Red Hat

What is star

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

How can I replace the lines that start with a star and replace it with numbers start from 1?

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

Star/Libre/Open/???-Office for Solaris 11.2 ?

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
rcmd(3) 						     Library Functions Manual							   rcmd(3)

NAME
rcmd, rcmd_r - Allow execution of commands on a remote host LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/types.h> #include <netdb.h> #include <unistd.h> int rcmd( char **host, u_short port, char *local_user, char *remote_user, char *command, int *err_file_desc); The following function is supported in order to maintain backward compatibility with previous versions of the operating system. int rcmd_r( char **host, u_short port, char *local_user, char *remote_user, char *command, int *err_file_desc, struct hostent_data *host_data); PARAMETERS
Specifies the name of a remote host that is listed in the /etc/hosts file. The function sets the host parameter to be the fully qualified hostname. Specifies the well-known port to use for the connection. The /etc/services file contains the DARPA Internet services, their ports, and socket types. Points to usernames that are valid at the local host. Any valid username can be given. Points to usernames that are valid at the remote host. Any valid username can be given. Specifies the name of the command to be executed at the remote host. Points to an address used by rcmd() to store a pointer to the file descriptor for a channel used by the remote process to write stderr mes- sages and to accept bytes as signal numbers to be forwarded to the process group of the command. If a null pointer is specified, the standard error (stderr) of the remote command is the same as the standard output (stdout). No provi- sion is made for sending arbitrary signals to the remote process. However, it is possible to send out-of-band data to the remote command. Per-thread data for reentrant version. DESCRIPTION
The rcmd() (remote command) function allows execution of certain commands on a remote host. For example, the rcmd() function is used by rsh and rlogin, among others. The rcmd() function looks up a host via the name server or, if the local name server is not running, via the /etc/hosts file. If the con- nection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the calling process and given to the remote command as standard input (stdin) and standard output (stdout). Always specify the host name. If the local domain and remote domain are the same, specifying the domain parts is optional. The rcmd() function returns the fully qualified hostname in the host parameter. To reuse the host name in another rcmd() call, you should make a string copy of the host parameter. For example: rcmd ( &host, .... ); first_host = strdup(host); ... rcmd ( &host, .... ); Only processes with an effective user ID of root user can use the rcmd() function. An authentication scheme based on remote port numbers is used to verify permissions. Ports in the range from 0 to 1023 can only be used by a root user. NOTES
The rcmd_r() function is the reentrant version of rcmd(). It is supported in order to maintain backward compatibility with previous ver- sions of the operating system. The netdb.h header file defines the hostent_data structures. RETURN VALUES
Upon successful completion, the rcmd() function returns a valid socket descriptor. The function returns a value of -1 if the effective user ID of the calling process is not root user, if the function fails to resolve the host, or if it encounters a socket connection error. FILES
Contains the service names, ports, and socket types. Contains hostnames and their addresses for the hosts in a network. Contains the name server and the domain name. RELATED INFORMATION
Functions: gethostname(2), rresvport(3), rresvport_af(3), ruserok(3), sethostname(2). Commands: rlogin(1), rsh(1). delim off rcmd(3)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy