Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Preserving the format of top command result Post 302693023 by pandeesh on Tuesday 28th of August 2012 12:07:02 PM
Old 08-28-2012
Preserving the format of top command result

hi,

I have tried the below command in RHEL5:
Code:
top|mailx -s "test" "abc@cvf.com"

But in the mail the content was not in proper format.
Is there any way to preserve the format ?

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Interpretting the result of TOP command

I want to find out how much memory is used by one unix process. I guess I can use unix top command. I have seen the SIZE and RES column in the TOP command. For Oracle client connections these values are too high about 700M , My system does not have that much pysical memory. Here is few Oracle... (2 Replies)
Discussion started by: sanjay92
2 Replies

2. UNIX for Dummies Questions & Answers

Preserving space during command substitution

Hi all, I am caught up in a problem .... tried all possible ways i knew .. but ended up in big zero ... ;-( I have a file as below .. $ cat siv.txt 1234567890BF00522000095ibsadministrator@ae.ge.com ibsadministrator@ae.ge.com Note the spaces in between .... I am... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

3. AIX

Top command in AIX 4.2 (no topas, no nmon, no top)?

Is there a 'top' command equivalent in AIX 4.2 ? I already checked and I do not see the following ones anywhere: top nmon topas (1 Reply)
Discussion started by: Browser_ice
1 Replies

4. Shell Programming and Scripting

Preserving newlines when writing loops on the command line in bash

Dear All, I have a question that's been difficult to get an answer to. I often write command line loops, e.g. find files, print name, grep for term, apply sed, etc I use both zsh and bash. When I write a loop e.g. for line in `more myfile.txt` > do > echo $line > done but... (2 Replies)
Discussion started by: JohnK1
2 Replies

5. Shell Programming and Scripting

how to format ssh top output

Hello; Am trying to generate runaway proc report using ssh thusly: =================== ssh -t -t $BOX 'TERMINAL="vt100" top -d1 -h -n 10' >> $FILE . . cat $FILE | mail -s "Latest Top `date`" $MAIL_TO ==================== But the output to e-mail comes out rather garbled .. Any ideas... (1 Reply)
Discussion started by: delphys
1 Replies

6. Shell Programming and Scripting

Preserving file format and spacing in output file

Hi I have a file with the following structure "VATTENFALL GLOBAL" "Vattenfall Tray" "BARCLAYS BANK LONDON" "Capula" "P1 AGEAS GLOBAL COMPANY" "AAC - Optiver" The requirement is like this 1) Take 2 input... (16 Replies)
Discussion started by: sudeep.id
16 Replies

7. Shell Programming and Scripting

Format data output result

Hi guys, need a guide to format desire output result here. Please guide me. Thanks in advance. 2012-08-30 00:01:56,554 DEBUG - Sending message<TTT232MM0N048YCI TTPC TTOF1A 289171092679389OOLU 1562340 TPM 641 KT$YES 20120830000156KK 12012301??????000011YGY> to... (7 Replies)
Discussion started by: ment0smintz
7 Replies

8. UNIX for Advanced & Expert Users

Analyzing Linux's top command's result

RHEL 5.4 What are the first things you would look for when analyzing Linux's top command output? Below is a top output from one of our Linux machines; Do you see anything wrong? top - 15:56:01 up 133 days, 5:55, 5 users, load average: 2.94, 2.93, 6.58 Tasks: 178 total, 2 running,... (2 Replies)
Discussion started by: John K
2 Replies

9. UNIX for Dummies Questions & Answers

Send Email To Windows OS Preserving The Format

I am trying to send an email using mailx and mutt commands with a body inside it. For some reason all the lines in the body are coming as one line, i figured it's not the issue with mailx/mutt but with line feed & carriage returns. So I tried adding carriage returns with below command based on... (13 Replies)
Discussion started by: Ariean
13 Replies

10. Shell Programming and Scripting

Format Top and prstat command output

need help with formatting output of command top and prstat. My requirment is to remove few columns and display remaining . But when i used awk to do that the output seems to be have gone vague, mixing the column values. After using awk to print particular column the output seems to have lost... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies
subst(n)						       Tcl Built-In Commands							  subst(n)

__________________________________________________________________________________________________________________________________________________

NAME
subst - Perform backslash, command, and variable substitutions SYNOPSIS
subst ?-nobackslashes? ?-nocommands? ?-novariables? string _________________________________________________________________ DESCRIPTION
This command performs variable substitutions, command substitutions, and backslash substitutions on its string argument and returns the fully-substituted result. The substitutions are performed in exactly the same way as for Tcl commands. As a result, the string argument is actually substituted twice, once by the Tcl parser in the usual fashion for Tcl commands, and again by the subst command. If any of the -nobackslashes, -nocommands, or -novariables are specified, then the corresponding substitutions are not performed. For example, if -nocommands is specified, command substitution is not performed: open and close brackets are treated as ordinary characters with no special interpretation. Note that the substitution of one kind can include substitution of other kinds. For example, even when the -novariables option is speci- fied, command substitution is performed without restriction. This means that any variable substitution necessary to complete the command substitution will still take place. Likewise, any command substitution necessary to complete a variable substitution will take place, even when -nocommands is specified. See the EXAMPLES below. If an error occurs during substitution, then subst will return that error. If a break exception occurs during command or variable substi- tution, the result of the whole substitution will be the string (as substituted) up to the start of the substitution that raised the excep- tion. If a continue exception occurs during the evaluation of a command or variable substitution, an empty string will be substituted for that entire command or variable substitution (as long as it is well-formed Tcl.) If a return exception occurs, or any other return code is returned during command or variable substitution, then the returned value is substituted for that substitution. See the EXAMPLES below. In this way, all exceptional return codes are "caught" by subst. The subst command itself will either return an error, or will complete successfully. EXAMPLES
When it performs its substitutions, subst does not give any special treatment to double quotes or curly braces (except within command sub- stitutions) so the script set a 44 subst {xyz {$a}} returns "xyz {44}", not "xyz {$a}" and the script set a "p} q {r" subst {xyz {$a}} returns "xyz {p} q {r}", not "xyz {p} q {r}". When command substitution is performed, it includes any variable substitution necessary to evaluate the script. set a 44 subst -novariables {$a [format $a]} returns "$a 44", not "$a $a". Similarly, when variable substitution is performed, it includes any command substitution necessary to retrieve the value of the variable. proc b {} {return c} array set a {c c [b] tricky} subst -nocommands {[b] $a([b])} returns "[b] c", not "[b] tricky". The continue and break exceptions allow command substitutions to prevent substitution of the rest of the command substitution and the rest of string respectively, giving script authors more options when processing text using subst. For example, the script subst {abc,[break],def} returns "abc,", not "abc,,def" and the script subst {abc,[continue;expr {1+2}],def} returns "abc,,def", not "abc,3,def". Other exceptional return codes substitute the returned value subst {abc,[return foo;expr {1+2}],def} returns "abc,foo,def", not "abc,3,def" and subst {abc,[return -code 10 foo;expr {1+2}],def} also returns "abc,foo,def", not "abc,3,def". SEE ALSO
Tcl(n), eval(n), break(n), continue(n) KEYWORDS
backslash substitution, command substitution, variable substitution Tcl 7.4 subst(n)
All times are GMT -4. The time now is 10:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy