Sponsored Content
Top Forums Shell Programming and Scripting running if statement on command line Post 302305608 by clx on Thursday 9th of April 2009 10:41:07 AM
Old 04-09-2009
if always requires fi to terminate.
so at this point, your command is incomplete and hence you are getting PS2 prompt.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

running multiple command in same line

I have 5 hosts and each host as 3 java process .I have one machine which has ssh keys so it can login without any passwords etc to all the machines. How can I find out say jstack or some command so it goes to each machine and run the command . For example machine 1 has 3 java process and they... (2 Replies)
Discussion started by: gubbu
2 Replies

2. UNIX and Linux Applications

Running oracle commands Directly from Command Line

In mysql, I can get what I want from a database without having to log into mysql. works great for me and it is perfect. now, i want to be able to do the same in oracle but I dont know how to. For example, if i want to retrieve information from the mysql database from the command line, i issue... (4 Replies)
Discussion started by: SkySmart
4 Replies

3. UNIX for Advanced & Expert Users

Running ksh script from command line

Hi. I have a ksh script I want to run, but I'm connecting through a telnet and I don't want to FTP the scripts itself. is there a way of running the script from command line ? like ksh "The script itself..." Thanks, Ramon (4 Replies)
Discussion started by: mellowcandle
4 Replies

4. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

5. Shell Programming and Scripting

running variable on command line

Hi, I have a unix script, and I have problem, where I work out the variable I need. But it will not excute the variable from the script ? See my script below for details : #!/bin/sh ENVGRP=`hostname |cut -c1-3 | tr '' ''` ENVINST=${ENVGRP}`hostname -i |cut -d\. -f 4` echo... (4 Replies)
Discussion started by: fettie
4 Replies

6. Shell Programming and Scripting

running multiple command in a single line

Hi Can we run the linux command and per script in a single command $ cd /usr/local/adm/ ;ctsv scmtest_qabuild ;cspec.pl scmtest This is a combination of linux and clearcase command and last one is perl script with argument. I can see the first and 2nd coomand is executing but last... (6 Replies)
Discussion started by: anuragpgtgerman
6 Replies

7. Shell Programming and Scripting

Running Two scripts in a single command line

Hi All, I have two scripts which i want to run in a single command line(or in a single script). And if both the scripts in the main script fail then i want to pass a value to a Application specific utility which will trigger some alert.The value can be anything. Somebody please help.It is... (1 Reply)
Discussion started by: shroh
1 Replies

8. Programming

Passing arguments from command line to switch case statement in C

Hi Am pretty new to C.. Am trying to pass the arguments from command line and use them in switch case statement.. i have tried the following #include <stdlib.h> main(int argc, char* argv) { int num=0; if ( argc == 2 ) num = argv; printf("%d is the num value",num); switch ( num ) ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

9. Shell Programming and Scripting

Issue in running a command line utility in CRON

Hi Everyone! I am facing an issue in running a command line utility from the CRON. This utility displays IPC statistics on UNIX message queues: The "queue name" and the "count" of messages in the queue. When running this utility from prompt, it will provide an output on the screen, like the... (4 Replies)
Discussion started by: vai_sh
4 Replies

10. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies
ttyadm(1M)						  System Administration Commands						ttyadm(1M)

NAME
ttyadm - format and output port monitor-specific information SYNOPSIS
/usr/sbin/ttyadm [-b] [-c] [-h] [-I] [-r count] [-i msg] [-m modules] [-p prompt] [-t timeout] [-S y | n] [-T termtype] -d device -l tty- label -s service /usr/sbin/ttyadm -V DESCRIPTION
The ttyadm command is an administrative command that formats ttymon(1M)-specific information and writes it to standard output. The Service Access Facility (SAF) requires each port monitor to provide such a command. Note that the port monitor administrative file is updated by the Service Access Controller's administrative commands, sacadm(1M) and pmadm(1M). ttyadm provides a means of presenting formatted port monitor-specific (ttymon-specific) data to these commands. OPTIONS
The following options are supported: -b Set the ``bi-directional port'' flag. When this flag is set, the line can be used in both directions. ttymon will allow users to connect to the service associated with the port, but if the port is free, uucico(1M), cu(1C), or ct(1C) can use it for dialing out. -c Set the connect-on-carrier flag for the port. If the -c flag is set, ttymon will invoke the port's associated service imme- diately when a connect indication is received (that is, no prompt is printed and no baud-rate searching is done). -d device device is the full pathname of the device file for the TTY port. -h Set the hangup flag for the port. If the -h flag is not set, ttymon will force a hangup on the line by setting the speed to 0 before setting the speed to the default or specified value. -i message Specify the inactive (disabled) response message. This message will be sent to the TTY port if the port is disabled or the ttymon monitoring the port is disabled. -I Initialize only. If the -I option is used, ttymon will invoke the service only once. This can be used to configure a par- ticular device without actually monitoring it, as with software carrier. -l ttylabel Specify which ttylabel in the /etc/ttydefs file to use as the starting point when searching for the proper baud rate. -m modules Specify a list of pushable STREAMS modules. The modules will be pushed in the order in which they are specified before the service is invoked. modules must be a comma-separated list of modules, with no white space included. Any modules currently on the stream will be popped before these modules are pushed. -p prompt Specify the prompt message, for example, ``login:''. -r count When the -r option is invoked, ttymon will wait until it receives data from the port before it displays a prompt. If count is 0, ttymon will wait until it receives any character. If count is greater than 0, ttymon will wait until count newlines have been received. -s service service is the full pathname of the service to be invoked when a connection request is received. If arguments are required, the command and its arguments must be enclosed in double quotes (" "). -S y|n Set the software carrier value. y will turn software carrier on. n will turn software carrier off. -t timeout Specify that ttymon should close a port if the open on the port succeeds, and no input data is received in timeout seconds. -T termtype Set the terminal type. The TERM environment variable will be set to termtype. -V Display the version number of the current /usr/lib/saf/ttymon command. OUTPUT
If successful, ttyadm will generate the requested information, write it to standard output, and exit with a status of 0. If ttyadm is invoked with an invalid number of arguments or invalid arguments, or if an incomplete option is specified, an error message will be written to standard error and ttymon will exit with a non-zero status. FILES
/etc/ttydefs ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ct(1C), cu(1C), pmadm(1M), sacadm(1M), ttymon(1M), uucico(1M), attributes(5) System Administration Guide: Basic Administration SunOS 5.10 14 Sep 1992 ttyadm(1M)
All times are GMT -4. The time now is 04:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy