02-06-2011
What Operating System and version do you have? (There is much variation in "who").
What Shell do you use?
Though I can't think of a "who" which outputs the terminal address in the posted format, nothing surprises me.
In most O/S the "who" command (with no parameters) does not give the address of the calling computer. You normally need "who -u" or "who -R".
Assuming you have a fairly mainstream O/S I would expect "who -s" to list only the fields you require. The command "who -sH" should put standard headings on the columns (but not the ones you require).
Beware that because we are in the early part of the month the day-of-month is a single digit. To keep the headings in consistent alignment you may need an additional space when compared with the example in Post #1 .
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm new to unix, and I was wondering how would you output the following date using the date command? Thank you in advance.
November 4,2005 17:04:31 EST Wednesday (1 Reply)
Discussion started by: Newguy4
1 Replies
2. Shell Programming and Scripting
I don't understand this, can anyone explain the evaluation logic used here, and I would really appreciate a general explanation for it.
----------------------
Here's the korn script:
--------------------
#! /usr/bin/ksh
if ]
then
echo true
else
echo false
fi
if (( 2 > 10 ))
then... (1 Reply)
Discussion started by: numstr
1 Replies
3. Shell Programming and Scripting
Hello,
I have the following line in one of my shell scripts. It works fine when the search string($SERACH_STR) exists in the logfile($ALERTLOG) but if the search string does not exist this line errors out at run time. Is there a way to make this line return 0 if it is not able to find the... (4 Replies)
Discussion started by: luft
4 Replies
4. UNIX for Dummies Questions & Answers
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies
5. Shell Programming and Scripting
exam is a ksh script. In command line I enter: exam 3 param_2 param_3 param_4.
In exam how can I get the value of the parameter which position is specified by the first argument.
Simply doing this DOES NOT work:
offset=$1
value=$$offset
can you figure out any possible way to interpret a... (5 Replies)
Discussion started by: i27oak
5 Replies
6. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
7. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
8. Shell Programming and Scripting
I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place.
What I need
The following command is placed at the prompt:
TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies
LEARN ABOUT MOJAVE
isless
ISGREATER(3) BSD Library Functions Manual ISGREATER(3)
NAME
isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered -- compare two floating-point numbers
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <math.h>
int
isgreater(real-floating x, real-floating y);
int
isgreaterequal(real-floating x, real-floating y);
int
isless(real-floating x, real-floating y);
int
islessequal(real-floating x, real-floating y);
int
islessgreater(real-floating x, real-floating y);
int
isunordered(real-floating x, real-floating y);
DESCRIPTION
Each of the macros isgreater(), isgreaterequal(), isless(), islessequal(), and islessgreater() takes arguments x and y and returns a non-zero
value if and only if its nominal relation on x and y is true. These macros always return zero if either argument is not a number (NaN), but
unlike the corresponding C operators, they never raise a floating point exception.
The isunordered() macro takes arguments x and y, returning non-zero if either x or y is NaN. For any pair of floating-point values, one of
the relationships (less, greater, equal, unordered) holds.
SEE ALSO
fpclassify(3), math(3), signbit(3)
STANDARDS
The isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), and isunordered() macros conform to ISO/IEC 9899:1999
(``ISO C99'').
BSD
December 1, 2008 BSD