03-03-2010
After the re-direction does the output still appear on the screen?
It might be using an alternate file descriptor.
is nicstat.Ubuntu7.i386 the (archaically named) program? Is there a man page for it?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i use awk -F to print three variable delimited by comma $1 $2 $3
if $2=="" i want to extract this information missing from another file using awk -v + some process.
but the problem i can't use the two awk together cause of redirection
there's a solution.
note: i can't use another... (1 Reply)
Discussion started by: kamel.seg
1 Replies
2. UNIX for Dummies Questions & Answers
Apologies for the trivial nature of this question but I cannot seem to get a simple re direct to a log file to work
Step 1
touch log.txt
at -f batch.sh now >> log.txt
I am trying to get the batch.sh contents into the log file
Manny Thanks (8 Replies)
Discussion started by: JohnCrump
8 Replies
3. Shell Programming and Scripting
Hi,
I want ssh to the remote server and then execute ls and redirect the output to the file in remote server itself
like
ssh root@$server `ls /var/log/users.txt > root@$server:/home/users.txt`
Can you please let me know the correct syntax for it.
Thanks in advance (2 Replies)
Discussion started by: mohitmoudgil
2 Replies
4. UNIX for Dummies Questions & Answers
Suppose I have a file named a
When I write
cat a>a
The following error message is displayed
cat: a: input file is output file
and my file a is truncated to zero size.
Also the exit status of the last command is 1
Can someone tell me what actually happens when I do so? (1 Reply)
Discussion started by: aagajaba
1 Replies
5. UNIX for Dummies Questions & Answers
I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines.
Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Discussion started by: joemommasfat
2 Replies
6. Shell Programming and Scripting
So I have a existing file that I used the uniq command on and I need to save the output to the same file without changing the file name.
I have tried $ uniq filename > filename
then when I cat the file it then becomes blank like there is nothing inside.
any help would be much appreciated... (0 Replies)
Discussion started by: drew211
0 Replies
7. Shell Programming and Scripting
I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies
8. UNIX for Dummies Questions & Answers
I almost reach my objective (Youhouuu !!!!)
But I really don't understand why it doesn't work until the end... :wall:
For clarity's sake I am taking a very simple example. The operations I am doing in the script (gsub and print) really don't have any importance !!! I just matter about... (10 Replies)
Discussion started by: beca123456
10 Replies
9. Shell Programming and Scripting
Hi,
I have a peculiar issue w.r.t redirecting the command output to a file when using loop.
I am redirecting command output to same file in a series of if condition statements, but if one block of if condition statement writes the log to the file , the subsequent block of if condition... (7 Replies)
Discussion started by: ananan
7 Replies
10. Shell Programming and Scripting
So I'm writing a script which tries to parse human-readable addresses. Part of it is this:
print $2, implode(A,1,AN," "), CITY, PROV, POST, COUNTRY, CITYCOUNT>2;
CITYCOUNT is a variable between 0 and 3 counting the number of words in a city name. I'm trying to prnt 1 wherever that's greater... (5 Replies)
Discussion started by: Corona688
5 Replies
LEARN ABOUT MOJAVE
i386_set_ldt
I386_GET_LDT(2) BSD System Calls Manual I386_GET_LDT(2)
NAME
i386_get_ldt, i386_set_ldt -- manage i386 per-process Local Descriptor Table entries
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <architecture/i386/table.h>
#include <i386/user_ldt.h>
int
i386_get_ldt(int start_sel, union ldt_entry *descs, int num_sels);
int
i386_set_ldt(int start_sel, union ldt_entry *descs, int num_sels);
DESCRIPTION
The i386_get_ldt() system call will return the list of i386 descriptors that the process has in its LDT. The i386_set_ldt() system call will
set a list of i386 descriptors for the current process in its LDT. Both routines accept a starting selector number start_sel, an array of
memory that will contain the descriptors to be set or returned descs, and the number of entries to set or return num_sels.
The argument descs can be either code_desc_t, data_desc_t or call_gate_t and are defined in <architecture/i386/desc.h>. These structures are
defined by the architecture as disjoint bit-fields, so care must be taken in constructing them.
If start_sel is LDT_AUTO_ALLOC, num_sels is 1 and the descriptor pointed to by descs is legal, then i386_set_ldt() will allocate a descriptor
and return its selector number.
If num_descs is 1, start_sels is valid, and descs is NULL, then i386_set_ldt() will free that descriptor (making it available to be reallo-
cated again later).
If num_descs is 0, start_sels is 0 and descs is NULL then, as a special case, i386_set_ldt() will free all descriptors.
RETURN VALUES
Upon successful completion, i386_get_ldt() returns the number of descriptors currently in the LDT. The i386_set_ldt() system call returns
the first selector set. In the case when a descriptor is allocated by the kernel, its number will be returned. Otherwise, a value of -1 is
returned and the global variable errno is set to indicate the error.
ERRORS
The i386_get_ldt() and i386_set_ldt() system calls will fail if:
[EINVAL] An inappropriate value was used for start_sel or num_sels.
[EACCES] The caller attempted to use a descriptor that would circumvent protection or cause a failure.
SEE ALSO
i386 Microprocessor Programmer's Reference Manual, Intel
WARNING
You can really hose your process using this.
BSD
September 20, 1993 BSD