Prevent output to window

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Prevent output to window
# 1  
Old 02-20-2008
Data Prevent output to window

Any suggestion on how to prevent Standard output and Standard Error to window?
# 2  
Old 02-20-2008

typically done with a redirect to /dev/null

for errors, something like:

ls -a 2>/dev/null

would show all files while not displaying file access errors

where would you want standard output to go?
why do something if you want to suppress its output?
# 3  
Old 02-20-2008
Originally Posted by katrvu
Any suggestion on how to prevent Standard output and Standard Error to window?
Depends on what shell your using (bash, csh, etc) on the syntax of the redirection of the stdout, stderr to /dev/null or a file.

But the man page for the shell or google will help.
# 4  
Old 02-20-2008
>where would you want standard output to go?
>why do something if you want to suppress its output?

because I want the test output to be in a better format and also don't want to change the file.
I think I have an idea what I can try now.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Toggle between xterm window and standard terminal window

Is it possible to toggle back and forth between an xterm invoked from one tty, and a shell invoked from a different tty? I am running Centos 7 with KDE and booting in non-graphic mode. After logging in on the default window (/dev/tty1) , I can then use ALT-F2 to access a new window (/dev/tty2),... (1 Reply)
Discussion started by: rhgscty
1 Replies

2. UNIX for Dummies Questions & Answers

Getting command output to putty window title.

Hi, Last 2 weeks I have searched many forums and i haven't found the answer for the question: How to get all command output to Putty title? Needed it for other programs to know when some jobs on a server is done and is it done right or wrong. Plink stdout and stdin wasn't working, i used many... (1 Reply)
Discussion started by: domagaj
1 Replies

3. UNIX for Dummies Questions & Answers

Executing ksh script to remote server want output on same window

I'm having a brain freeze moment. I've created a ksh script in AIX that ssh's to a remote server, executes some commands, and then logs out. All of this is sent to a file. I then have the script cat the file so i can see the output. Even though the cat command is outside of the remote session part;... (5 Replies)
Discussion started by: seekryts15
5 Replies

4. UNIX for Advanced & Expert Users

How to prevent Accidents 'rm -rf *'?

When invoking unix commands from other third party tools (IBM ETL), we run the rm / mv commands with the folder as argument been passed. Eg rm -rf {folder}/* when the parameter {folder} did not pass rightly or becomes blank, the command becomes dangerous to execute rm -rf /* How to prevent... (9 Replies)
Discussion started by: deepakwins
9 Replies

5. UNIX for Dummies Questions & Answers

How to remove/prevent Input/output error

Hi I have a new hdd installed ,and sometimes if i start a session or ftp download while downloading sometimes it creates a ./filename.type Input/output errorso in that case i can-not overwrite ,rename ,remove ,or place a file with the same name on that dir. How to prevent this and is there... (3 Replies)
Discussion started by: brain!ac
3 Replies

6. Red Hat

Maximizing X window without Window Switcher

Hi everyone! I have a strange situation. I'm running an NX remote Gnome desktop session. On the remote machine, there is a whole load of unsaved data in a window. A problem that I've been having with this NX session is that I can't load Gnome Applets, including the Window Switcher. So.. when I... (0 Replies)
Discussion started by: alexandicity
0 Replies

7. UNIX for Dummies Questions & Answers

Compare 2 files and output result in pop up window

Need help ! how do i compare 2 files and if there is a difference, output a massage in a pop up window? the script meant to run using crontab. (2 Replies)
Discussion started by: hongsh
2 Replies

8. AIX

Prevent ftp usage

Is there a way to prevent users to use ftp on my server? And only allow root to use ftp. Thanx (1 Reply)
Discussion started by: NineInch
1 Replies

9. Programming

how to prevent deadlock on this...

I am using linux termios structure to configure serial port and read the port by read function. For some reason, if I read the whole buffer, almost every time the buffer does not contain the correct reply message sequence from a device sending reply to my linux PC. So I use... (5 Replies)
Discussion started by: yimab
5 Replies

10. Windows & DOS: Issues & Discussions

window 2000 professional not pinging my window 98 system.

Hello, We someone help me resolve this problem. I have window 2000 professional, windows 98 and Unixware 7.0.1 on the network. I was able to establish connection with all. However, l was unable to ping window 98 from window 2000 professional. I was able to ping the window 2000 from the window... (10 Replies)
Discussion started by: kayode
10 Replies
Login or Register to Ask a Question