Sponsored Content
Top Forums Shell Programming and Scripting problem with suppressed output to file using echo and tee command Post 302455085 by shahanali on Monday 20th of September 2010 07:05:43 PM
Old 09-20-2010
problem with suppressed output to file using echo and tee command

Hi,

When I run the following command in terminal it works. The string TEST is appended to a file silently.
Code:
echo TEST | tee -a file.txt &>/dev/null

However, when I paste this same line to a file, say shell1.sh, and use bourne shell .

I run this file in terminal, ./shell1.sh.
However I still get the output TEST in the display. Is this some kind of limitation of bourne shell. How can I suppress this output?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is there a way to tee stderr from a command that's redirecting error to a file?

I'm not a complete novice at unix but I'm not all that advanced either. I'm hoping that someone with a little more knowledge than myself has the answer I'm looking for. I'm writing a wrapper script that will be passed user commands from the cron... Ex: ./mywrapper.sh "/usr/bin/ps -ef |... (1 Reply)
Discussion started by: sumgi
1 Replies

2. Shell Programming and Scripting

Problem using echo command for text starting with /

Hi, i need to print following text using echo: /abc dir/c\ so i tried echo "/abc dir/c\ But it gives me error of Incorrect usage, i am using Hamilton cshell in windows Vista. Can any one please help me. Thanks in advance Sarbjit (3 Replies)
Discussion started by: sarbjit
3 Replies

3. Shell Programming and Scripting

Echo and a command's output on the same line

Hello, I'm writing some bash scripts and I'm trying to get an echo command and the output of another command to display on the same line. For example: I want to run echo "Operating System: " unameand have it displayed as Operating System: Darwin Thanks for your help! (7 Replies)
Discussion started by: codyhazelwood
7 Replies

4. Shell Programming and Scripting

echo two command output in the same line

Hi, I try to write script and echo two command at the same line . echo "A" echo "B" How can I pipe above two command at the same line in text file . So, in the output text file , you can see below ??? A B not A B Any sugggestion ??? (4 Replies)
Discussion started by: chuikingman
4 Replies

5. Shell Programming and Scripting

Event logging to file and display to console | tee command is not able to log all info.

My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Discussion started by: sanoop
3 Replies

6. Shell Programming and Scripting

Screen output is blocked by "| tee" command

BACK STORY: I have a script build.py . (It's for creating the ISO file for a special edition of Swift Linux.) This build.py script executes the mintConstructor.py script that I use to modify the Regular Swift Linux ISO to get the special edition Swift Linux ISO. The lines of the script that... (2 Replies)
Discussion started by: swiftlinux
2 Replies

7. Shell Programming and Scripting

Problem with echo command

I am trying to get ascii file using echo command, e.g. - echo "\050" It is correctly working on RHEL 4 but not in RHEL 5. Please help me to fix the issue. ## Working as expected in RHEL 4 $ lsb_release -d Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 8) $ echo... (4 Replies)
Discussion started by: atanubanerji
4 Replies

8. Shell Programming and Scripting

Problem with writing to output - awk, echo

Hello all, I wrote this command line for some calculation on my given input files based on another input file which is a txt file. while read BAM REGION; do samtools view $BAM $REGION | awk '{if ($2==0) print $0}' | wc -l >>log.txt; echo "$REGION"; done >> log.txt <regions.txt It takes... (4 Replies)
Discussion started by: @man
4 Replies

9. Shell Programming and Scripting

Echo output from command

Hello i am trying to do some calculation from output command for example ls -l if then echo "error" else echo "$" fi its something like this which get strings from output command and try to sum total lines of this string if exceed certain number it display error if not it... (3 Replies)
Discussion started by: mogabr
3 Replies

10. Shell Programming and Scripting

How to echo output of a UNIX command (like ls -l ) using shell script.?

How do i echo the output of a unix command using shell script??? Like: echo /etc/ ls -l (2 Replies)
Discussion started by: sunny2802
2 Replies
Mail::SpamAssassin::Plugin::Shortcircuit(3pm)		User Contributed Perl Documentation	     Mail::SpamAssassin::Plugin::Shortcircuit(3pm)

NAME
Mail::SpamAssassin::Plugin::Shortcircuit - short-circuit evaluation for certain rules SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::Shortcircuit report Content analysis details: (_SCORE_ points, _REQD_ required, s/c _SCTYPE_) add_header all Status "_YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ shortcircuit=_SCTYPE_ autolearn=_AUTOLEARN_ version=_VERSION_" DESCRIPTION
This plugin implements simple, test-based shortcircuiting. Shortcircuiting a test will force all other pending rules to be skipped, if that test is hit. In addition, a symbolic rule, "SHORTCIRCUIT", will fire. Recomended usage is to use "priority" to set rules with strong S/O values (ie. 1.0) to be run first, and make instant spam or ham classification based on that. CONFIGURATION SETTINGS
The following configuration settings are used to control shortcircuiting: shortcircuit SYMBOLIC_TEST_NAME {ham|spam|on|off} Shortcircuiting a test will force all other pending rules to be skipped, if that test is hit. Recomended usage is to use "priority" to set rules with strong S/O values (ie. 1.0) to be run first, and make instant spam or ham classification based on that. To override a test that uses shortcircuiting, you can set the classification type to "off". on Shortcircuits the rest of the tests, but does not make a strict classification of spam or ham. Rather, it uses the default score for the rule being shortcircuited. This would allow you, for example, to define a rule such as body TEST /test/ describe TEST test rule that scores barely over spam threshold score TEST 5.5 priority TEST -100 shortcircuit TEST on The result of a message hitting the above rule would be a final score of 5.5, as opposed to 100 (default) if it were classified as spam. off Disables shortcircuiting on said rule. spam Shortcircuit the rule using a set of defaults; override the default score of this rule with the score from "shortcircuit_spam_score", set the "noautolearn" tflag, and set priority to "-100". In other words, equivalent to: shortcircuit TEST on priority TEST -100 score TEST 100 tflags TEST noautolearn ham Shortcircuit the rule using a set of defaults; override the default score of this rule with the score from "shortcircuit_ham_score", set the "noautolearn" and "nice" tflags, and set priority to "-100". In other words, equivalent to: shortcircuit TEST on priority TEST -100 score TEST -100 tflags TEST noautolearn nice shortcircuit_spam_score n.nn (default: 100) When shortcircuit is used on a rule, and the shortcircuit classification type is set to "spam", this value should be applied in place of the default score for that rule. shortcircuit_ham_score n.nn (default: -100) When shortcircuit is used on a rule, and the shortcircuit classification type is set to "ham", this value should be applied in place of the default score for that rule. TAGS
The following tags are added to the set available for use in reports, headers etc.: _SC_ shortcircuit status (classification and rule name) _SCRULE_ rulename that caused the shortcircuit _SCTYPE_ shortcircuit classification ("spam", "ham", "default", "none") SEE ALSO
"http://issues.apache.org/SpamAssassin/show_bug.cgi?id=3109" perl v5.14.2 2011-06-06 Mail::SpamAssassin::Plugin::Shortcircuit(3pm)
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy