Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Display message on screen and flat file at same time Post 302442665 by Scott on Thursday 5th of August 2010 04:34:29 AM
Old 08-05-2010
Hi.

Use tee

Code:
echo "$var" | tee -a $DIR/example.txt

If you don't need var for anything else, you could just use:

Code:
./Example.sh | tee -a $DIR/example.txt

This User Gave Thanks to Scott For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file display on screen on pg at time

hi can some body please help me...i'm been sitting here trying to figure how to do this..but still don't understand. Like each type of *.src (if any) in the given directory will be displayed on the screen one page at a time.... can someone explain how to do this..plz (1 Reply)
Discussion started by: zip_zip
1 Replies

2. Shell Programming and Scripting

Unwanted Error Message on Screen

Below is a part of the script that I wrote when checking whether a file exist in the Internal Disk or not. If a file doesn't exist, how do you get rid of the error message "file or directory does not exist" to show up on screen? Instead, I wanted only the warning message "FILE DOES NOT EXIST IN... (5 Replies)
Discussion started by: ilak1008
5 Replies

3. What is on Your Mind?

Flat Panel Display

Hi, I am going to buy a new TV set, but I am not sure what to buy.. I would like to have a Flat Screen, around 42" (~106cm), but i am a bit confused... Reading the technical papers, plasma displays seems to better, but talking with friends and colleagues, they would prefer LCDs... Plasma... (2 Replies)
Discussion started by: pressy
2 Replies

4. Shell Programming and Scripting

screen display help

Hello All, I have a file that is formatted like this 1234556 1234567 1234588 1123888 1999999 1010101 1919191 1919191.... for a total of 26000 + lines how do I get a script to read lets say 50 lines at a time and display the output to the screen in column format around 5 or 6... (2 Replies)
Discussion started by: zilla30066
2 Replies

5. Shell Programming and Scripting

Redirecting STDERR message to STDOUT & file at same time

Friends I have to redirect STDERR messages both to screen and also capture the same in a file. 2 > &1 | tee file works but it also displays the non error messages to file, while i only need error messages. Can anyone help?? (10 Replies)
Discussion started by: vikashtulsiyan
10 Replies

6. Shell Programming and Scripting

Pattern matching in file and then display 10 lines above every time

hiii, i have to write a shell script like this---- i have a huge log file name abc.log .i have to search for a pattern name "pattern",it may occur 1000 times in the log file,every time it finds the pattern it should display the 10 lines above the pattern. I appericiate your help. (30 Replies)
Discussion started by: namishtiwari
30 Replies

7. Shell Programming and Scripting

Run a bash script, display on the screen and save all information in a file including error info

Hi all, How to: Run a bash script, display on the screen and save all information in a file including error information. For example: I have a bash script called test.sh now I want to run the test.sh and display the output on the screen and save the output including error info to a file. ... (1 Reply)
Discussion started by: Damon sine
1 Replies

8. Shell Programming and Scripting

Refrain the Message of File Not exists display out

Hi All, Would like to ask on how to refrain the message file not exists from display out. if ; then When it execute, the OS will throw the error file does not exists ls: 0653-341 The file COL_*/*.CTL does not exist. Thanks. (3 Replies)
Discussion started by: ckwan
3 Replies

9. Shell Programming and Scripting

Need Suggestion, on how to constantly moniter a file and display content with in that time

Dear Gurus, I'm in a strange situation, hence need some kind of advice or possible syntax to carry on. let's say current time/date is 2013-12-18, 15:58:15 I got a file something like this, which keep getting updated with respect to time. 2013-12-18,... (4 Replies)
Discussion started by: manas_ranjan
4 Replies

10. Shell Programming and Scripting

Long list file display different time format.

Hi Gurus, I have some weird issue. when using ls -l the result shows different time format: -rw-r--r-- 1 abc gourp1 3032605576 Jun 14 2013 abc -rw-rw-r-- 1 abc gourp1 1689948832 Aug 10 06:22 abc one display 2013 which is year; another one displays 06:22 which is time. ... (4 Replies)
Discussion started by: ken6503
4 Replies
SYNC_MEMBERS(8) 					      System Manager's Manual						   SYNC_MEMBERS(8)

NAME
sync_members - Synchronize a Mailman mailing list's membership with a flat file. SYNOPSIS
sync_members [options] -f file listname DESCRIPTION
This script is useful if you have a Mailman mailing list and a sendmail :include: style list of addresses (also as is used in Majordomo). For every address in the file that does not appear in the mailing list, the address is added. For every address in the mailing list that does not appear in the file, the address is removed. Other options control what happens when an address is added or removed. OPTIONS
-n, --no-change Don't actually make the changes. Instead, print out what would be done to the list. -w={ yes | no }, --welcome-msg={ yes | no } Sets whether or not to send the newly added members a welcome message, overriding whatever the list's `send_welcome_msg' setting is. With -w=yes or -w, the welcome message is sent. With -w=no, no message is sent. -g={ yes | no }, --goodbye-msg={ yes | no } Sets whether or not to send the goodbye message to removed members, overriding whatever the list's `send_goodbye_msg' setting is. With -g=yes or -g, the goodbye message is sent. With -g=no, no message is sent. -d={ yes | no }, --digest={ yes | no } Selects whether to make newly added members receive messages in digests. With -d=yes or -d, they become digest members. With -d=no (or if no -d option given) they are added as regular members. -a={ yes | no }, --notifyadmin={ yes | no } Specifies whether the admin should be notified for each subscription or unsubscription. If you're adding a lot of addresses, you definitely want to turn this off! With -a=yes or -a, the admin is notified. With -a=no, the admin is not notified. With no -a option, the default for the list is used. -f=filename, --file=filename This option is required. It specifies the flat file to synchronize against. Email addresses must appear one per line. If filename is `-' then stdin is used. -h, --help Print a small help text and exit. listname specifies the list to synchronize. AUTHOR
Author of Mailman is the Mailman Cabal, see http://www.list.org/ for information. This manpage is written by Tollef Fog Heen <tfheen@debian.org> for Debian, but may be used by others. SEE ALSO
Mailman documentation on http://www.list.org/ and in /usr/share/doc/mailman. 2007-07-14 SYNC_MEMBERS(8)
All times are GMT -4. The time now is 04:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy