Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to print script output to screen and file Post 302277292 by sptr on Friday 16th of January 2009 12:47:22 AM
Old 01-16-2009
OK, I've understood. Thanks rwuerth.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

echo or print to screen and file

I did a search for this topic but I couldn't find it and I was sure I have seen something similar before (hard because I am not sure of the criteria for the keywords) What I was looking for was to be able to echo a message to the screen from a bash.sh script at the same time logging it to a... (2 Replies)
Discussion started by: Shakey21
2 Replies

2. Shell Programming and Scripting

print to screen and to file using awk?!

Hello all!.. does anyone know the syntax to print to the screen and to a file? Im using something like AWK .... print header |tee -a invalid_csv_file ; END {..} ' invalid_csv_file="$invalid_csv_dir_file" but no joy? I get sh:... (2 Replies)
Discussion started by: satnamx
2 Replies

3. Shell Programming and Scripting

perl - print to a log file and screen

as the title suggests, i need to print a user message to a log file and the screen using perl. in unix i set up a function using 'tee' like so function Display_Message { echo "$*" | tee -ai $LOGFILE } the following command then obviously displays to the screen and prints to a log... (6 Replies)
Discussion started by: mjays
6 Replies

4. Shell Programming and Scripting

To parse through the file and print output using awk or sed script

suppose if u have a file like that Hen ABCCSGSGSGJJJJK 15 Cock ABCCSGGGSGIJJJL 15 * * * * * * : * * * . * * * : Hen CFCDFCSDFCDERTF 30 Cock CHCDFCSDHCDEGFI 30 * . * * * * * * * : * * :* : : . The output shud be where there is : and . It shud... (4 Replies)
Discussion started by: cdfd123
4 Replies

5. Shell Programming and Scripting

awk to compare lines of two files and print output on screen

hey guys, I have two files both with two columns, I have already created an awk code to ignore certain lines (e.g lines that start with 963) as they wou ld begin with a certain string, however, the rest I have added together and calculated the average. At the moment the code also displays... (3 Replies)
Discussion started by: chlfc
3 Replies

6. UNIX for Advanced & Expert Users

Shell Script to compare xml files and print output to a file

All, PLease can you help me with a shell script which can compare two xml files and print the difference to a output file. I have attached one such file for you reference. <Group> <Member ID=":Year_Quad:41501" childCount="4" fullPath="PEPSICO Year-Quad-Wk : FOLDER.52 Weeks Ending Dec... (2 Replies)
Discussion started by: kanthrajgowda
2 Replies

7. Programming

std::cout and gfortran print*, don't output to the screen

I am not sure where to post this other than here. I am trying to figure out why an app gives different output when compiled under Ubuntu 10.10 and CentOS 5.5. I am pretty sure that the issue is that the Cent version has gcc 4.1 installed, while Ubuntu has gcc 4.4. I am trying to print from some... (20 Replies)
Discussion started by: LMHmedchem
20 Replies

8. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

9. Shell Programming and Scripting

How to print and append output of nawk script in commandline and as well into a file?

Hi All, I am working on nawk script, has the small function which prints the output on the screen.Am trying to print/append the same output in a file. Basically nawk script should print the output on the console/screen and as well it should write/append the same result to a file. script :... (3 Replies)
Discussion started by: Optimus81
3 Replies

10. Shell Programming and Scripting

Need output of script on screen and file with correct return status of the called script.

Hi, I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed. Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies
TELINIT(8)							      telinit								TELINIT(8)

NAME
telinit - Change SysV runlevel SYNOPSIS
telinit [OPTIONS...] {COMMAND} DESCRIPTION
telinit may be used to change the SysV system runlevel. Since the concept of SysV runlevels is obsolete the runlevel requests will be transparently translated into systemd unit activation requests. OPTIONS
The following options are understood: --help Prints a short help text and exits. --no-wall Do not send wall message before reboot/halt/power-off. The following commands are understood: 0 Power-off the machine. This is translated into an activation request for poweroff.target and is equivalent to systemctl poweroff. 6 Reboot the machine. This is translated into an activation request for reboot.target and is equivalent to systemctl reboot. 2, 3, 4, 5 Change the SysV runlevel. This is translated into an activation request for runlevel2.target, runlevel3.target, ... and is equivalent to systemctl isolate runlevel2.target, systemctl isolate runlevel3.target, ... 1, s, S Change into system rescue mode. This is translated into an activation request for rescue.target and is equivalent to systemctl rescue. q, Q Reload daemon configuration. This is equivalent to systemctl daemon-reload. u, U Serialize state, reexecute daemon and deserialize state again. This is equivalent to systemctl daemon-reexec. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. NOTES
This is a legacy command available for compatibility only. It should not be used anymore, as the concept of runlevels is obsolete. SEE ALSO
systemd(1), systemctl(1), wall(1) systemd 208 TELINIT(8)
All times are GMT -4. The time now is 01:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy