redirecting gcc messages


 
Thread Tools Search this Thread
Top Forums Programming redirecting gcc messages
# 1  
Old 04-06-2006
redirecting gcc messages

When I execute make, the gcc is echoing all the command lines to the console. How can I redirect these lines to a file?

The same question for the @echo command.

Thanks,
rkt
# 2  
Old 04-06-2006
To redirect any output, just use the redirection operators '>' and '>>'. The '>' will truncate any existing file and write to that file, while '>>' will append to an already existing file.
# 3  
Old 04-06-2006
Quote:
Originally Posted by blowtorch
To redirect any output, just use the redirection operators '>' and '>>'. The '>' will truncate any existing file and write to that file, while '>>' will append to an already existing file.
thanks! it works.
is there any possibility to have both in the same time, echo to the console and to a file?
# 4  
Old 04-06-2006
Quote:
Originally Posted by rakkota
is there any possibility to have both in the same time, echo to the console and to a file?
Try the 'tee' command. Check the man page for details. Again, it is possible to truncate the output file or append to it. Just use the appropriate switch.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirecting the output

For example, if we run the below command, symcfg list -thin -pool , results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it doesnt result any output and even though the output is being redirected, i can see "No Thin Pools "... (2 Replies)
Discussion started by: web2moha
2 Replies

2. UNIX for Advanced & Expert Users

Clarification about redirecting

Hi AM Using Unix Aix Used ${CMD} 2> ${ERR} Dont get what above statement works . SCRIPT=`basename $0` ERR=$PWD/$SCRIPT.err DATE=`date +"%d/%m/%Y"` CMD=2 ${CMD} 2> ${ERR} if then echo "SUCCESS" else echo "FAILURE" fi (1 Reply)
Discussion started by: Venkatesh1
1 Replies

3. Shell Programming and Scripting

redirecting help

I am trying to create the file and redirect the output in the same command line which is line 4 in the below program. #!/bin/bash read -p "Enter File Name:" value1 echo "Your File Name is $value1" sed 's/abcd/'$value1'/g' abcd_calls > $value1_calls This is the error it generates ... (3 Replies)
Discussion started by: learnbash
3 Replies

4. Shell Programming and Scripting

Blocked while Redirecting the syslog messages to a pipe in the rc script file

Hi All, I am newbie to linux and i am trying to re-direct the syslog messages to a pipe. I have modified the syslog.conf file accordingly and have written an rc script to read from the pipe and put them to a file. I was able to get the log messages to the file but my system is getting ... (1 Reply)
Discussion started by: anilmurala
1 Replies

5. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

6. Shell Programming and Scripting

Redirecting to stdin

Hi, I'm having trouble with my script. I have to select different choices without any interaction from a menu that looks like : a - xxxxxxxxxxxxxx b - xxxxxxxxxxxxxx c - xxxxxxxxxxxxxx d - xxxxxxxxxxxxxx I tried things like : echo "a" >&0 read < echo "a" but none worked. Any... (4 Replies)
Discussion started by: flame_eagle
4 Replies

7. UNIX for Advanced & Expert Users

MX redirecting

I in no means consider myself a expert in unix however my question is a little more complex. I am running a mac os 10 server and all web settings and email settings have been set up using the unix terminal. I am in the process or redirecting my mxrecords to a spam filtering company but i am... (11 Replies)
Discussion started by: nbredthauer
11 Replies

8. Shell Programming and Scripting

Redirecting the warning messages.

I have written a Perl module. We know that we have to include the "-w" option in the first line as good programming practise. #! /usr/bin/perl -w Now when i use this,it gives me a number of warnings which are pretty much harmless as the code works perfectly fine without the -w option. Now... (1 Reply)
Discussion started by: keka
1 Replies

9. Programming

Redirecting

How to redirect the contents of a file to a command? The contents of the file are the arguments necessary for the command. thx in advance. bye svh (5 Replies)
Discussion started by: svh
5 Replies

10. UNIX for Advanced & Expert Users

redirecting/piping

i want to fully undertand redirecting/piping. i know most of the basic stuff, like ls|less or cat file|grep hello etc etc. but there are a somethings like find / -name file 2>/dev/null. what's is the 2? i know it redirects the errors (at least Permission denied ones) to /dev/null (the unix... (3 Replies)
Discussion started by: crashnburn
3 Replies
Login or Register to Ask a Question