Sponsored Content
Full Discussion: Can't rcmd with star name
Top Forums Shell Programming and Scripting Can't rcmd with star name Post 303021019 by wbport on Thursday 2nd of August 2018 06:34:17 PM
Old 08-02-2018
Can't rcmd with star name

We have had a script here for years used to send files to other computers or to rcmd a command entered thru a prompt. A file we are looking for on the other computers will start with the same characters followed by -nnnnnn.txt. I can log into another computer and find (or not) that file, but not with a rcmd. This is the relevant part of the script:
Code:
    read cmdname
    date >>/usr/tmp/fixit.x$tstamp
    echo "Running $cmdname" >>/usr/tmp/fixit.x$tstamp
    exec 9</usr/shells/remote.list
    while in=`line <&9`
    do
       echo $in
       echo $in >>/usr/tmp/fixit.x$tstamp
       set  $in
       in=$4
       rcmd $in $cmdname 2>&1 |tee -a /usr/tmp/fixit.x$tstamp
    done

A command like "ls -l /dir1/dir2/FILEONE-.*" doesn't work.

Any ideas? TIA This is a SCO machine but the remotes may be SCO or Linux.
 

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(1) 						    BSD General Commands Manual 						   RCMD(1)

NAME
rcmd -- backend driver for rcmd(3) SYNOPSIS
rcmd [-46dn] [-l username] [-p port] [-u localusername] host command DESCRIPTION
rcmd executes command on host. rcmd copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit and terminate signals are propagated to the remote command; rcmd normally terminates when the remote command does. The options are as follows: -4 Use IPv4 addresses only. -6 Use IPv6 addresses only. -d The -d option turns on socket debugging (using setsockopt(2)) on the TCP sockets used for communication with the remote host. -l By default, the remote username is the same as the local username. The -l option allows the remote name to be specified. Another pos- sible way to specify the remote username is the notation user@host. -n The -n option redirects input from the special device /dev/null (see the BUGS section of this manual page). -p port Uses the given port instead of the one assigned to the service ``shell''. May be given either as symbolic name or as number. -u The -u option allows the local username to be specified. Only the superuser is allowed to use this option. Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. For example, the command rcmd otherhost cat remotefile >> localfile appends the remote file remotefile to the local file localfile, while rcmd otherhost cat remotefile ">>" other_remotefile appends remotefile to other_remotefile. FILES
/etc/hosts SEE ALSO
rsh(1), rcmd(3), environ(7) HISTORY
The rcmd command appeared in NetBSD 1.3 and is primarily derived from rsh(1). Its purpose was to create a backend driver for rcmd(3) that would allow the users of rcmd(3) to no longer require super-user privileges. BUGS
If you are using csh(1) and put a rcmd in the background without redirecting its input away from the terminal, it will block even if no reads are posted by the remote command. If no input is desired you should redirect the input of rcmd to /dev/null using the -n option. You cannot use rcmd to run an interactive command (like rogue(6) or vi(1)). Use rlogin(1) instead. The stop signal, SIGSTOP, will stop the local rcmd process only. This is arguably wrong, but currently hard to fix for reasons too compli- cated to explain here. BSD
May 31, 2011 BSD
All times are GMT -4. The time now is 10:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy