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
make2cook(1)						      General Commands Manual						      make2cook(1)

NAME
make2cook - translate makefiles into cookbooks SYNOPSIS
make2cook [ option... ][ infile [ outfile ]] make2cook -Help make2cook -VERSion DESCRIPTION
The make2cook program is used to translate Makefiles into cookbooks. This command is provided to ease the transition to using the cook command. If no input file is named, or the special name ``-'' is used, input will be taken from the standard input. If no output file is named, or the special name ``-'' is used, output will be taken from the standard output. SEMANTICS
There is no one-to-one semantic mapping between make semantics and cook semantics, so the results will probably need some manual editing. The functionality provided by classic make (1) implementations is accurately reproduced. Extensions, such as those offered by GNU Make or BSD make, are not always understood, or are sometimes not reproduced identically. The following subsections enumerate a few of the things which are understood and not understood. They are probably not complete. Understood The cook program requires variables to be defined before they are used, whereas make will default them to be empty. This is understood, and empty definitions are inserted as required. Most of the builtin variables of GNU Make are understood. Most of the builtin rules of classic make, GNU Make and BSD make are reproduced. For best results there should be a blank line after every rule, so that there can be no confusion where one rule ends and a new one begins. Builtin variables are defaulted from the environment, if an environment variable of the same name is set. The GNU Make override variable assignment is understood. The GNU Make ``+='' assignment is understood. The GNU Make ``:='' variable assignment is understood. Traditional make assignments are macros, they are expanded on use, rather than on assignment. The cook program has only variables. Assignment statements are re-arranged to ensure the correct results when variables are referenced. Single and double suffix rules are understood. The .SUFFIXES rules are understood and honoured. Hint: if you want to suppress the builtin-recipes, use a .SUFFIXES rule with no dependencies. The .PHONY rule is understood, and is translated into a set forced flag in appropriate recipes, except files from implicit recipes. The .PRECIOUS rule is understood, and is translated into a set precious flag in the appropriate recipes, except files from implicit recipes. The .DEFAULT rule is understood, and is translated into an implicit recipe. The .IGNORE rule is understood, and is translated into a set errok statement. The .SILENT rule is understood, and is translated into a set silent statement. Most GNU Make functions are understood. The filter and filter-out functions only understand a single pattern. The sort function does not remove duplicates (wrap the stringset function around it if you need this). The GNU Make static pattern rules are understood. They are translated into recipe predicates. The GNU Make and BSD make include variants are understood. The bizarre irregularities surrounding archive files in automatic variables and suffix rules are understood, and translated into consistent readable recipes. The make semantics are preserved. The BSD make .CURDIR variable is understood, and translated to an equivalent expression. It cannot be assigned to. The GNU Make and BSD make conditionals are understood, provided that they bracket whole segments of the makefile, and that these segments are syntactically valid. Cconditionals may also appear within rule body commands. Conditionals are not understood within the lines of a define. The GNU Make define is understood, but its use as a kind of ``function definition'' is not understood. The GNU Make export and unexport directives are understood. Not Understood The cook program tokenizes its input, whereas make does textual replacement. The shennanigans required to construct a make macro containing a single space are not understood. The translation will result in a cook variable which is empty. References to automatic variables within macro definitions will not work. The GNU Make foreach function is olny partially understood. This has no exact cook equivalent. The GNU Make origin function is not understood. This has no cook equivalent. The archive((member)) notation is not understood. These semantics are not available from cook. The MAKEFILES and MAKELEVEL variables are not translated, If you wish to reproduce this functionality, you must edit the output. The MAKEFLAGS and MFLAGS variables will be translated to use the Cook options function, which has a different range of values. Many variants of make can use builtin rules to make the Makefile if it is absent. Cook is unable to cook the cookbook if it is absent. Wildcards are not understood in rule targets, rule dependencies or include directives. If you want these, you will have to edit the output to use the [wildcard] function. Home directory tildes (~) are not understood in targets and dependencies. If you want this, you will have to edit the output to use the [home] function. The -lhome dependency is not understood to mean a library. If you want this, you will have to edit the output to use the [collect findlibs -lname] function. The .EXPORT_ALL_VARIABLES rule is not understood. This has no cook equivalent. OPTIONS
The following options are understood: -Help Provide some help with using the make2cook command. -Environment This option causes fragments to test for environment variables when performing the default settings for variables. (This corresponds to the make -e option.) -History_Commands This option causes make2cook to include recipes for RCS and SCCS in the output. -Line_Numbers Insert line number directives into the output, so that it is possible to tell where the lines came from. Most useful when debugging. make2cook program. -No_Internal_Rules This option may be used to supress all generation of recipes corresponding to make's internal rules. (This corresponds to the make -r option.) -VERSion Print the version of the make2cook program being executed. All other options will produce a diagnostic error. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-help", "-HEL" and "-h" are all interpreted to mean the -Help option. The argument "-hlp" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line. The GNU long option names are understood. Since all option names for make2cook are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood. EXIT STATUS
The make2cook command will exit with a status of 1 on any error. The make2cook command will only exit with a status of 0 if there are no errors. COPYRIGHT
make2cook version 2.33 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Miller The make2cook program comes with ABSOLUTELY NO WARRANTY; for details use the 'make2cook -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'make2cook -VERSion License' command. AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au //* WWW: http://miller.emu.id.au/pmiller/ Reference Manual Cook make2cook(1)
All times are GMT -4. The time now is 09:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy