I found the answer to logging to a file for the sections I choose. Seemed pretty simple, just put the log_file command before the place I wish to have logged.
To stop logging, enter the command alone:
hi, everyone:
I just wonder how to save the output of command, I mean everything, save as a string into a variable.
another question is I try to ls the details of a directory, but it works in the shell, not in the script.
for example
code: ls -ltr *se100* | grep ^- | tail -1 | awk '... (1 Reply)
Hi friends,
I have a doubt, I am not sure whether it is possible ah nu.
I am having a file(sample.txt) which contain 5 lines.
I want to remove 1st line in the file and save the file with same old name (sample.txt).
For removing 1st line i am using
sed 1d filename
But dono how to... (3 Replies)
I have a text file which has blank lines. I want them to be removed before upload it to DB using SQL *Loader. Below is the command line, i use to remove blank lines.
sed '/^ *$/d' /loc/test.txt
If i use the below command to replace the file after removing the blank lines, it replace the... (6 Replies)
Hi.
Here is beginning of my script
#!/usr/local/bin/expect --
set timeout 15
spawn /usr/local/account.sh -n modify
expect "Password:" {send "mypassword\r"}
But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this:
and expect... (3 Replies)
Hi,
For some reason I was needed to ping some URL and save the output to a file through Expect script, following is a very basic of that script, but it fails everytime. When I just copied the same 'ping' line to normal Terminal and run, it runs fine. Please, help.
#!/bin/sh
spawn ping -c 3... (1 Reply)
Hi, all
I have a csv file that I would like to remove duplicate lines based on 1st field and sort them by the 1st field. If there are more than 1 line which is same on the 1st field, I want to keep the first line of them and remove the rest. I think I have to use uniq or something, but I still... (8 Replies)
Hy guys,
My name is Alex, i am new here and I hope to find some answers. I am trying to run a expect script to telnet to a mikrotik router, run a command (export), and save the output of that commant to a file (outputfile.txt). The problem is that only part of the output is saved to... (2 Replies)
Hi guys,
I am trying to install a software which is a shell script. I am using expect to do the silent installation.
There is a strange line during the installation of the software like this below. The prompt goes to the next line.
ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE... (0 Replies)
I have a script that does an SSH into a remote node. It should expect the prompt and send the password.
#!/usr/bin/expect
set user ;
set pass ;
spawn ssh $user@E-Internal
expect {
-re "RSA key fingerprint" {send "yes\r"}
timeout... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
LEARN ABOUT HPUX
rusersd
rusersd(1M)rusersd(1M)NAME
rusersd - network username server
SYNOPSIS
log_file]
DESCRIPTION
is an RPC server that returns a list of users on the network. The command prints this information (see rusers(1)).
invokes through (see inetd(1M)).
Options
recognizes the following options and command-line arguments:
Log any errors to the named log file,
log_file. Errors are not logged if the option is not specified.
Information logged to the file includes date and time of the error, the host name, process ID and name of the func-
tion generating the error, and the error message. Note that different services can share a single log file since
enough information is included to uniquely identify each error.
Exit after serving each RPC request.
Using the option, the security file can control access to RPC services.
Exit only if
o dies (see portmap(1M)),
o another registers with or
o becomes unregistered with
The option is more efficient because a new process is not launched for each RPC request. This option is the default.
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO rusers(1), inetd(1M), portmap(1M), inetd.conf(4), inetd.sec(4), services(4).
rusersd(1M)