The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need to write a script in UNIX to find a file if another file exists mmdawg Shell Programming and Scripting 1 05-04-2008 10:40 PM
changing /cn@0:console file permissions ErnieG Security 4 12-04-2007 08:39 AM
Logging all console activity to a file - how? patwa UNIX for Dummies Questions & Answers 4 06-13-2007 10:09 PM
How do i access (mount, read & write) a floppy disk from the console, not being root? kfaday UNIX for Dummies Questions & Answers 4 05-13-2005 11:17 AM
/dev/console file malikabid UNIX for Dummies Questions & Answers 4 03-02-2005 02:59 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-30-2007
harikamamidala harikamamidala is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 7
To write to console and file

Hi,

How can i redirect the traces to both the console and to a file..
The way i was doing was:

/home/harika/harika/samp.exe
if [ $? -eq 0 ]; then
echo "executed the first exe.." >> /dev/console;/home/harika/harika/trace.txt

/home/harika/harika/memset.exe
echo "executed the second exe..." >> /dev/console;/home/harika/harika/trace.txt

else
echo " the first executable is not properly executed..." >> /dev/console;/home/harika/harika/trace.txt
fi

Its giving me error as permission denied.. I have logged as root user and even changed the permissions of the /dev/console to 777...

Regards,
Harika
  #2 (permalink)  
Old 07-30-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,953
looking for something like this to write into console and file ...

Code:
./executable | tee filename_dump
Is there any reason that output is appeneded to a character special file ?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0