Sponsored Content
Top Forums Shell Programming and Scripting Expect, save to file and remove before prompt Post 302413454 by numele on Thursday 15th of April 2010 08:06:44 PM
Old 04-15-2010
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.
Code:
log_file $logfile

To stop logging, enter the command alone:
Code:
log_file

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to save the output of command in tcl/expect

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)
Discussion started by: allenxiao7
1 Replies

2. Shell Programming and Scripting

need to remove 1st line of a file and save the file with same old name

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)
Discussion started by: natraj005
3 Replies

3. Shell Programming and Scripting

How to remove blank lines in a file and save the file with same name?

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)
Discussion started by: vel4ever
6 Replies

4. UNIX for Dummies Questions & Answers

pine email tool suppress prompt to save read messages

Could somebody please advise about how to configure pine/alpine so that on exit it doesn't prompt me to save read messages? Thanks (3 Replies)
Discussion started by: LeoKSimon
3 Replies

5. Shell Programming and Scripting

Expect doesn't recognize a password prompt

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)
Discussion started by: urello
3 Replies

6. Shell Programming and Scripting

Expect script brokes when Ping file save

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)
Discussion started by: santanu4ver
1 Replies

7. Shell Programming and Scripting

Remove duplicate lines, sort it and save it as file itself

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)
Discussion started by: refrain
8 Replies

8. Shell Programming and Scripting

Expect script to save configuration from a router

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)
Discussion started by: axexandru
2 Replies

9. Shell Programming and Scripting

Expect prompt extending to next line

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)
Discussion started by: kapkap
0 Replies

10. Shell Programming and Scripting

Expect script not expecting the password prompt

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
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)
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy