In bash, I need to send the STDOUT and STDERR from a command to one file, and then just STDERR to another file. Doing one or the other using redirects is easy, but trying to do both at once is a bit tricky. Anyone have any ideas? (9 Replies)
Is there a way to redirect all stdout to a file implicitly - like defining stdout=/home/me/process.log - so that all "echo" commands in several scripts/subscripts are written to that file; instead of having to edit all scripts to redirect the "echo" (e.g. echo 'This is a test ' >>... (1 Reply)
Hi,
I am trying to execute a command like this:
find ./ -name "*.gz" -exec sh -c 'zcat {} | awk -f parse.awk' \; >> output
If I want to print the filename, i generally use the -print argument to the find command but when I am redirecting the output to a file, how can I print just the... (2 Replies)
I have an executable that, depending on its input, outputs to either one file or several. It usually prints nothing on screen. The usual way to call this program is to specify an input and output filenames, like this:
./executable.exe -i inputfile -o outputfileIt will then try to use the output... (1 Reply)
Hi,
I am working on a project where I have to generate and execute nasm code on-the-fly. I generate the code in a file program.asm and then execute it.This output is to stdout which i redirect to an output file which i read back to compare results:
system("nasm -f elf program.asm >... (5 Replies)
can anyone help me in making singleline command for
Capital Letters are folders ,small letter are files
X,Y,Z are subfolders of A
as shown below
A - X,Y,Z
Folder X has three files a.txt,b.txt,c.txt similarly Y,Z.
as shown below
X- a.txt,b.txt,c.txt
Y- a.txt,b.txt,c.txt
Z-... (4 Replies)
Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do
a=$(svn up)
echo $a
because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?
Thanks,... (2 Replies)
I have a simple bash script that prints sth every 5 seconds. What I do is the following. I redirect the output of the script to a file, tail the file and see that it works and then from another console I delete the file where the output is redirected to. Even though I have deleted the file, the... (2 Replies)
I have a C program that continously outputs info to stdout. The problem is that I am redirecting the stdout and stderr to a file and stdout is written at the end of the problem rather than continously to the file. This could be a problem if for example the program is killed and the stdout output is... (3 Replies)
hi,
OK. I am writing a bash script, and it is almost working for me.
Problem 1: I currently have stout sent to a file (stout.miRNA.bash.$date_formatted) which I would like to have work inside my loop, but when I move it, it just prints to the screen.
Problem 2: I have a second file... (18 Replies)
Discussion started by: hmortens
18 Replies
LEARN ABOUT OSF1
rc2
rc2(8) System Manager's Manual rc2(8)NAME
rc2 - Run command script executed when entering a multiuser run level
SYNOPSIS
rc2
DESCRIPTION
The rc2 script contains run commands that enable initialization of the system to a multiuser state; run level 2. In addition to commands
listed within the script itself, rc2 contains instructions to run certain commands found in the /sbin/rc2.d directory. The script defines
the conditions under which the commands execute; some commands run if the system is booting, other commands execute if the system is chang-
ing run levels.
By convention, files in the /sbin/rc2.d directory begin with either the letter "K" or the letter "S" and are followed by a two-digit number
and a filename; for example: K00lpd S00savecore S25uucp
In general, the system starts commands that begin with the letter "S" and stops commands that begin with the letter "K." Commands that
begin with the letter "K" run only when the system is changing run levels from a higher to a lower level. Commands that begin with the
letter "S" run in all cases. The numbering of commands in the /sbin/rc2.d directory is important since the numbers are sorted and the com-
mands are run in ascending order. Files in the /sbin/rc2.d directory are normally links to files in the /etc/init.d directory.
An entry in the inittab file causes the system to execute the rc2 run commands, for example: s2:23:wait:/sbin/rc2 < /dev/console >
/dev/console 2>&1
The following operations are typical of those that result from executing the rc2 script and the commands located in the /sbin/rc2.d direc-
tory. The operation depends on which state the system is entering or exiting. Setting the time zone Checking the current run level Stop-
ping network services and daemons Starting (or stopping) system services and daemons Starting the cron daemon Setting up paging and dump
facilities Setting up uucp files
Setting the TIMEZONE variable is one of the first operations completed by the rc2 script. This action provides the default time zone for
subsequent commands.
FILES
Specifies the command path Specifies the directory of commands that correspond to the run level
RELATED INFORMATION
Commands: init(8), rc0(8), rc3(8) delim off
rc2(8)