05-11-2018
Did you consider redirecting stderr to /dev/null?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
what's the proper syntax to redirect output, including all errors?
ls -la > direct.list makes out put file direct.list
but if i'm running a script and i want to include the errors, would i type something like:
myscript.scr 2> out_list.txt or will that get the errors only? (1 Reply)
Discussion started by: kymberm
1 Replies
2. UNIX for Dummies Questions & Answers
I want to check whether the variable read from the console is number or character , so i used echo $option|grep and checked the reuslt returned by grep cmd using $?
But since I use echo the value is getting printed in the screen , I want to supress the o/p. Can anyone suggest how this can be... (1 Reply)
Discussion started by: rolex.mp
1 Replies
3. UNIX for Dummies Questions & Answers
hi
I'm new here so my question maybe be retarded or out of place:
Is there a way to suppress the "No such file or directory" error message when using the "ls" command ?
thanks (5 Replies)
Discussion started by: basher400
5 Replies
4. Programming
I have code which at the moment only catches the command/program output if the program runs correctly, which is a small problem as I would like to capture everything from stdout inclusive of errors
FILE *fp;
fp = popen(command.c_str(), "r");
while(fgets(cbuf, 1024, fp) != NULL){
.....do stuff... (1 Reply)
Discussion started by: mshindo
1 Replies
5. Shell Programming and Scripting
Is there a way to suppress the output that script command displays - "Script command started..." (4 Replies)
Discussion started by: ggayathri
4 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to spawn a telnet process and trying to do some actions in the remote host using expect script. I would like to know how to suppress all the output in order the user using the script should not be able to see any actions done on the remote host. I tried using the "log_user 0"... (8 Replies)
Discussion started by: arun_maffy
8 Replies
7. Shell Programming and Scripting
Need help redirecting output to a file including errors if any,I have 2 script namely push.ksh and run.ksh, I'm scp'ing push.ksh to another server and executing remotely via run.ksh, the script run.ksh runs locally but does not capture any errors in "servername.out" file (I tried testing various... (10 Replies)
Discussion started by: mbak
10 Replies
8. HP-UX
for
ga016dgf -> /usr/bin/last | cut -c1-3
Invalid record size. Unable to continue ...
any ideas?
running on
ga016dgf -> uname -a
HP-UX ga016dgf B.11.31 U ia64 1246079591 unlimited-user license
thank you.
Video tutorial on how to use code tags in The UNIX and Linux Forums. (4 Replies)
Discussion started by: Bill L.
4 Replies
9. Shell Programming and Scripting
Hi folks,
I am trying to send an email in Perl script with the below code.
I have written the code in Padre IDE and installed all the required modules(Mail::Sendmail) and executed the code.
It is neither showing errors nor giving the output. I havnt received an mail after running the below... (1 Reply)
Discussion started by: giridhar276
1 Replies
10. Programming
This script produces no errors. It also does not produce an output file. Any ideas?
#!/usr/bin/python
import tarfile
output_filename = 'etc.tar'
source_dir = '/etc/'
#To build a .tar.gz for an entire directory tree:
def make_tarfile(output_filename, source_dir):
with... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
LEARN ABOUT NETBSD
mount_fdesc
MOUNT_FDESC(8) BSD System Manager's Manual MOUNT_FDESC(8)
NAME
mount_fdesc -- mount the file-descriptor file system
SYNOPSIS
mount_fdesc [-o options] fdesc mount_point
DESCRIPTION
The mount_fdesc command attaches an instance of the per-process file descriptor namespace to the global filesystem namespace. The conven-
tional mount point is /dev and the filesystem should be union mounted in order to augment, rather than replace, the existing entries in /dev.
The directory specified by mount_point is converted to an absolute path before use.
This command is normally executed by mount(8) at boot time.
The options are as follows:
-o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options
and their meanings.
The contents of the mount point are fd, stderr, stdin, stdout and tty.
fd is a directory whose contents appear as a list of numbered files which correspond to the open files of the process reading the directory.
The files /dev/fd/0 through /dev/fd/# refer to file descriptors which can be accessed through the file system. If the file descriptor is
open and the mode the file is being opened with is a subset of the mode of the existing descriptor, the call:
fd = open("/dev/fd/0", mode);
and the call:
fd = fcntl(0, F_DUPFD, 0);
are equivalent.
The files /dev/stdin, /dev/stdout and /dev/stderr appear as symlinks to the relevant entry in the /dev/fd sub-directory. Opening them is
equivalent to the following calls:
fd = fcntl(STDIN_FILENO, F_DUPFD, 0);
fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
fd = fcntl(STDERR_FILENO, F_DUPFD, 0);
Flags to the open(2) call other than O_RDONLY, O_WRONLY and O_RDWR are ignored.
The /dev/tty entry is an indirect reference to the current process's controlling terminal. It appears as a named pipe (FIFO) but behaves in
exactly the same way as the real controlling terminal device.
FILES
/dev/fd/#
/dev/stdin
/dev/stdout
/dev/stderr
/dev/tty
SEE ALSO
mount(2), unmount(2), tty(4), fstab(5), mount(8)
HISTORY
The mount_fdesc utility first appeared in 4.4BSD.
BUGS
This filesystem may not be NFS-exported.
BSD
March 27, 1994 BSD