11-16-2006
ZB, using the '-l' option achieves (almost) the same result. But I didn't get that /dev/null thing. Can you explain?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I want to grep one file for a search string and get the next 10 lines after the search string.
for eg,in file tnsnames.ora,i have 100 entries.i want to search for one string and get the entry for that db.
please help how to acheive this using awk or sed?
Thanks. (11 Replies)
Discussion started by: raga
11 Replies
2. Shell Programming and Scripting
i have a file like
<fruits>
<red>redcolor<\red>
<banana>yellow color and it is<\banana>
</fruits>
i want to search for a word in a file data between the tags
i mean searching should be done in redcolcor, yellow color and it is (2 Replies)
Discussion started by: pvr_satya
2 Replies
3. Shell Programming and Scripting
Hi all,
I have a folder with many files. I need to get all the filenames with the value "<f id=audio-time>*:*:*</f>" word.
* may be any integer.
I used find . -type f -exec grep -H '<f id=audio-time>.:.</f>' {} \;
command to get.
but i am not able to find the correct values.
Any... (2 Replies)
Discussion started by: ananthi_ku
2 Replies
4. Shell Programming and Scripting
Hi
Pretty sure this is very simple hence im banging my head o the wall as to why i cant get this to work:
Im greping against many files where there will be the following string:
Date: Thu, Aug 23 2001 09:27 PM
(of course values such as date ,time and PM/AM will vary.)
Im trying to grep... (1 Reply)
Discussion started by: duonut
1 Replies
5. Shell Programming and Scripting
Hi
I am in new in unix,can any one tell how to grep the data by limit.
suppose I have below data:-
is :mSecs
is :mSecs
is :mSecs
is :mSecs
requirement is how to grep the data which is having count greater than 1000 msecs only.
thanks in adnavce. (2 Replies)
Discussion started by: abhigrkist
2 Replies
6. Shell Programming and Scripting
hi,
i got files delimited by |^ character. eg.
apple|^ball|^cat|^dog|^egg
i need to find if the above file contains | (pipe ) character inside the data.eg.
apple|^ball|^cat|^d|og|^egg.
above file contains | character in the dog data. how can i search that. (4 Replies)
Discussion started by: krk
4 Replies
7. Shell Programming and Scripting
Hi All,
I'm using aix flavour unix where im trying for the below kind of pattern to search in all the files in a directory.
I tried with different possible combinations like
grep -ir "out.*\transaction_ctry_code" * etc....
Pattern I'm trying for :
out<any thing>country_cd
Here i... (0 Replies)
Discussion started by: rmkganesh
0 Replies
8. Shell Programming and Scripting
I have a huge log file close to 3GB in size.
My task is to generate some reporting based on # of times something is being logged.
I need to find the number of time StringA , StringB , StringC is being called separately.
What I am doing right now is:
grep "StringA" server.log | wc -l... (4 Replies)
Discussion started by: Junaid Subhani
4 Replies
9. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
10. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 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