Sponsored Content
Top Forums Shell Programming and Scripting Help with printing new line in shell script Post 302660109 by surdileep on Friday 22nd of June 2012 05:50:40 AM
Old 06-22-2012
Help with printing new line in shell script

I'm having a script which outputs four different attributes A, B, C, D for a list of users.

I want to insert expression such that once the output is generated for first user, output for next user should be printed in new line.

Please help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

printing last argument in shell script

All, I am having a shell script and i will pass different argument diferent time . Please tell me how can i find the last argument that i passsed each time when i exec the script. Thanks, Arun. (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

2. Shell Programming and Scripting

Problem printing the property of xml file via shell script

Hi, I have a config.xml which cointains the tags like <CONFIG> <PROPERTY name="port" value="1111"/> <PROPERTY name="dbname" value="ABCDE"/> <PROPERTY name="connectstring" value="xyz/pwd"/> </CONFIG> This file is in some directory at UNix box. I need to write a... (4 Replies)
Discussion started by: neeto
4 Replies

3. Shell Programming and Scripting

help needed in a shell script for printing files

Hi All, I am writing a shell script to print all the files in a particular folder. This script is on solaris server . I am using the lp command to send the requests . lp -d printername filename . The output I get is the request id. Is there any way I can use the request Id to determine if... (1 Reply)
Discussion started by: shahshilpa
1 Replies

4. Shell Programming and Scripting

shell script, why isn't if printing message?

Why isn't printing message? 1 #!/bin/sh 2 3 something(){ 4 echo "Inside something" 5 echo $1 $2 6 } 7 val=$(something "Hello " "world") But it prints. 1 #!/bin/sh 2 3 something(){ 4 echo "Inside something" 5 echo $1 $2 6 } 7... (4 Replies)
Discussion started by: cola
4 Replies

5. Shell Programming and Scripting

Printing the line number in bash script

Hi, I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened. Thanks, (6 Replies)
Discussion started by: suryaemlinux
6 Replies

6. Shell Programming and Scripting

Printing from Shell Script

My print alias that works fine from the command line does not function from withn a shell script. Instead of actually performing the printing, it instead writes out the name of the file I'm trying to print. Does anyone know why? Much Thanks. (3 Replies)
Discussion started by: ttilsch
3 Replies

7. Shell Programming and Scripting

Need help with Korn Shell script for substring printing

Hi all, I am new to scripting. I have a file with colon separated values called mylist.txt cat mylist.txt 192.123.76.89:lmprod89 162.122.20.28:lmtstserver28 10.80.32.139:hewprod139 . . using our internal os utility (called mvsping) we need to check all these servers if they are... (6 Replies)
Discussion started by: kraljic
6 Replies

8. Shell Programming and Scripting

Need help in Perl Script for printing next line

I got multiple of documents in which i have to extract a line coming after a ID..The scenario is Customer ID: none VT : 002/89 Customer ID: Yes VT: 001/89 Customer ID: none VT: 006/85 Customer ID: Yes VT: 003/56 I have to extract the id which is coming after YES..The output... (7 Replies)
Discussion started by: rajkrishna89
7 Replies

9. Shell Programming and Scripting

sed , awk script for printing matched line before regular expression

hi All , I am having a large file with lots of modules as shown below ############################################### module KKK kksd kskks jsn;lsm jsnlsn; Ring jjsjsj kskmsm jjs endmodule module llll 1kksd11 k232skks j33sn;l55sm (6 Replies)
Discussion started by: kshitij
6 Replies

10. Shell Programming and Scripting

Printing line in shell script

Need assistance in getting a shell program . I have csv file and each line has comma separated number. I wanted to take of the comas and print each number in each line . below example. Appreicate your help Row with number ... (14 Replies)
Discussion started by: ajayram_arya
14 Replies
message(1F)							   FMLI Commands						       message(1F)

NAME
message - puts its arguments on FMLI message line SYNOPSIS
message [-t] [ -b [num]] [-o] [-w] [string] message [-f] [ -b [num]] [-o] [-w] [string] message [-p] [ -b [num]] [-o] [-w] [string] DESCRIPTION
The message command puts string out on the FMLI message line. If there is no string, the stdin input to message will be used. The output of message has a duration (length of time it remains on the message line). The default duration is "transient": it or one of two other dura- tions can be requested with the mutually-exclusive options below. Messages displayed with message -p will replace (change the value of) any message currently displayed or stored via use of the permanentmsg descriptor. Likewise, message -f will replace any message currently displayed or stored via use of the framemsg descriptor. If more than one message in a frame definition file is specified with the -p option, the last one specified will be the permanent duration message. The string argument should always be the last argument. OPTIONS
-t Explicitly defines a message to have transient duration. Transient messages remain on the message line only until the user presses another key or a CHECKWORLD occurs. The descriptors itemmsg , fieldmsg , invalidmsg , choicemsg , the default-if-not-defined value of oninterrupt , and FMLI generated error messages (that is, from syntax errors) also output transient duration messages. Tran- sient messages take precedence over both frame messages and permanent messages. -f Defines a message to have "frame" duration. Frame messages remain on the message line as long as the frame in which they are defined is current. The descriptor framemsg also outputs a frame duration message. Frame messages take precedence over permanent messages. -p Defines a message to have "permanent" duration. Permanent messages remain on the message line for the length of the FMLI session, unless explicitly replaced by another permanent message or temporarily superseded by a transient message or frame message. A per- manent message is not affected by navigating away from, or by closing, the frame which generated the permanent message. The descriptor permanentmsg also outputs a permanent duration message. -b[num] Rings the terminal bell num times, where num is an integer from 1 to 10. The default value is 1. If the terminal has no bell, the screen will flash num times instead, if possible. -o Forces message to duplicate its message to stdout . -w Turns on the working indicator. EXAMPLES
Example 1: A sample output of message on the message line: When a value entered in a field is invalid, ring the bell 3 times and then display Invalid Entry: Try again! on the message line: invalidmsg=`message -b 3 "Invalid Entry: Try again!"` Display a message that tells the user what is being done: done=`message EDITOR has been set in your environment` close Display a message on the message line and stdout for each field in a form (a pseudo-"field duration" message). fieldmsg="`message -o -f "Enter a filename."`" Display a blank transient message (effect is to "remove" a permanent or frame duration message). done=`message ""` nop ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sleep(1), attributes(5) NOTES
If message is coded more than once on a single line, it may appear that only the right-most instance is interpreted and displayed. Use sleep(1) between uses of message in this case, to display multiple messages. message -f should not be used in a stand-alone backquoted expression or with the init descriptor because the frame is not yet current when these are evaluated. In cases where `message -f "string"` is part of a stand-alone backquoted expression, the context for evaluation of the expression is the previously current frame. The previously current frame can be the frame that issued the open command for the frame containing the back- quoted expression, or it can be a frame given as an argument when fmli was invoked. That is, the previously current frame is the one whose frame message will be modified. Permanent duration messages are displayed when the user navigates to the command line. SunOS 5.10 5 Jul 1990 message(1F)
All times are GMT -4. The time now is 11:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy