Sponsored Content
Top Forums Shell Programming and Scripting Unwanted Error Message on Screen Post 88264 by ilak1008 on Wednesday 2nd of November 2005 01:30:26 PM
Old 11-02-2005
Unwanted Error Message on Screen

Quote:
Originally Posted by supaphat
ls $SOLHOME/internalDisk/"$fn" 2> /dev/null | wc -l > cfn

What this does is redirect stderr from the `ls` command to /dev/null (bit bucket) =p
I have done the above commands but it gave me this Error Message:
Ambiguous output redirect

I also tried the following:

ls $SOLHOME/internalDisk/"$fn" | wc -l > cfn 2>&errors and gave the same error.
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display message on screen and flat file at same time

Hi guys, I have a script that call another, the other displays de message and I can print directly to the flat file, but in one command I am searchig that this message can be displayed in the screen and in the flat file in one command. I am doing something like this: var=$(./Example.sh)... (2 Replies)
Discussion started by: pipoca
2 Replies

2. AIX

AIX power problem cron message on screen

Hello, I keep getting this message even after i removed it from the cron enteries it was added automatically Broadcast message from root@oradb (tty) at 12:00:00 ... rc.powerfail:2::WARNING!!! The system is now operating with a power problem. This message will be walled every 12... (2 Replies)
Discussion started by: filosophizer
2 Replies

3. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

4. Shell Programming and Scripting

Getting phone number, its message and assigning them into 2 variables then screen output.

Hi Everyone, I have a flatfile "inbox.txt" which contains some information: Location 0, folder "Inbox", SIM memory, Inbox folder SMS message SMSC number : "+24800000023" Sent : Sat 04 Aug 2012 09:01:00 PM +0700 Coding : Default GSM alphabet... (5 Replies)
Discussion started by: testcase
5 Replies

5. UNIX for Dummies Questions & Answers

Accidentally made a screen within a screen - how to move it up one level?

I made a screen within a screen. Is there a way to move the inner screen up one level so that it is at the same level as the first screen running from the shell? (2 Replies)
Discussion started by: phpchick
2 Replies
DAEMON(3)						     Linux Programmer's Manual							 DAEMON(3)

NAME
daemon - run in the background SYNOPSIS
#include <unistd.h> int daemon(int nochdir, int noclose); DESCRIPTION
The daemon() function is for programs wishing to detach themselves from the controlling terminal and run in the background as system dae- mons. Unless the argument nochdir is non-zero, daemon() changes the current working directory to the root ("/"). Unless the argument noclose is non-zero, daemon() will redirect standard input, standard output and standard error to /dev/null. RETURN VALUE
(This function forks, and if the fork() succeeds, the father does _exit(0), so that further errors are seen by the child only.) On success zero will be returned. If an error occurs, daemon() returns -1 and sets the global variable errno to any of the errors specified for the library functions fork(2) and setsid(2). SEE ALSO
fork(2), setsid(2) NOTES
The glibc implementation can also return -1 when /dev/null exists but is not a character device with the expected major and minor numbers. In this case errno need not be set. HISTORY
The daemon() function first appeared in BSD4.4. BSD MANPAGE
1993-06-09 DAEMON(3)
All times are GMT -4. The time now is 08:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy