10-13-2000
I looked at the man page on the bash shell and the korn shell. Both have build-in arithmetic operators like -eq and -le which are called CONDITIONAL OPERATORS.
If you read the man page and use these CONDITIONAL OPERATORS the problem in your post is easily solved.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have some basic doubts. Can someone clarify in this forum?
1)if
then
eval ' tset -s -Q -m ':?hp' '
else
eval ' tset -s -Q '
what does it exactly mean in .profile?
2) what are 'nobody' and 'noaccess' usernames in /etc/passwd file.
... (3 Replies)
Discussion started by: asutoshch
3 Replies
2. UNIX for Dummies Questions & Answers
is there any reason why a user would want to create an empty file in Unix? (5 Replies)
Discussion started by: wmosley2
5 Replies
3. UNIX for Dummies Questions & Answers
hey...when i type who...what does "pts" field mean???
eg pts 0 etc (1 Reply)
Discussion started by: urwannabefriend
1 Replies
4. IP Networking
With not knowing absolute nothing about Unix can anyone let me in on how it is setup and how easy is it to learn?I'm using MML Commands and know that it is completely different but if I start learning commands in UNIX is that a good way to get started? (1 Reply)
Discussion started by: RoliOCon
1 Replies
5. UNIX for Dummies Questions & Answers
How to know if my AIX 5.2 is running at 64bits?
THANKS (5 Replies)
Discussion started by: GermanSkull
5 Replies
6. UNIX for Dummies Questions & Answers
Hello all. Let me start off by saying I know a little more then it seems by me asking this question... here goes
I have an old 486 box and I want to start messing around with unix. I've been taking classes for 3 or 4 years in c programming in unix, so I am used to the commands and such, but I... (1 Reply)
Discussion started by: robherms
1 Replies
7. HP-UX
Could someone tell me the command to find out the OS version which will give 12 character not the 9 characters(which is usually machine id).
uname -i gives machine id and uname -a is more comprehensive way to look.
Thanks! (4 Replies)
Discussion started by: catwomen
4 Replies
8. Shell Programming and Scripting
hi,
I have a basic question,,
i am in a directory called
/intas/OCU_3.9.1/sbin
ocuut1@france>mv itsa_tcs itsa_tcs_old
mv: itsa_tcs_old: rename: Permission denied
i am logging as the owner of the file.
when i am doing this i am getting the above error of permission denied.
I know... (3 Replies)
Discussion started by: namishtiwari
3 Replies
9. Shell Programming and Scripting
i'm doing this in one terminal:
nc -lu 7402
and it appears to start listening properly, then in another i do this:
echo "hello" | nc -u localhost 7402
and nothing happens on the listening terminal - what am i doing wrong?
thanks. (7 Replies)
Discussion started by: peterworth
7 Replies
10. Solaris
Hello,
I'm new to solaris and have an experience with linux. When we see network interface I can see qfe, hme, le0. What is that mean? Is it depend on the network card? (11 Replies)
Discussion started by: mokkan
11 Replies
FBB::User(3bobcat) /etc/passwd user info FBB::User(3bobcat)
NAME
FBB::User - Provides the /etc/passwd info of the current user
SYNOPSIS
#include <bobcat/user>
Linking option: -lbobcat
DESCRIPTION
This class retrieves the information of the current user from the information in /etc/passwd. The class is a simple wrapper class around
the getpwent(3) function.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM
-
CONSTRUCTORS
o User():
The default constructor determines the current user's data. This constructor throws an Errno exception if it did not properly com-
plete because the current user name could not be found in /etc/passwd. The copy and move constructors are available.
OVERLOADED OPERATORS
The copy and move assignment operators are available.
MEMBER FUNCTIONS
o size_t groupid() const:
Returns the user's group-id.
o std::string homedir() const:
Returns the user's home directory (including a trailing /).
o std::string name() const:
Returns the user's user-name.
o std::string password() const:
Returns the user's encrypted password. But see also the BUGS section.
o std::string realname() const:
Returns the user's real name, as listed in the /etc/passwd's gecos field.
o std::string shell() const:
Returns the user's shell.
o size_t userid() const:
Returns the user's user-id.
o void verify() const:
Obsoleted, will be removed in a future Bobcat release.
EXAMPLE
#include <bobcat/user>
#include <iostream>
using namespace std;
using namespace FBB;
int main()
{
User user;
user.verify();
cout << "
"
"name : " << user.name() << "
" <<
"password : " << user.password() << "
" <<
"user id : " << user.userid() << "
" <<
"group id : " << user.groupid() << "
" <<
"real name : " << user.realname() << "
" <<
"home dir : " << user.homedir() << "
" <<
"shell : " << user.shell() << "
" << endl;
return 0;
}
FILES
bobcat/user - defines the class interface
SEE ALSO
bobcat(7), getpwent(3)
BUGS
If the user is a member of multiple groups, only the group id listed in /etc/passwd is returned by groupid().
If shadow passwording is used, the string returned by password() will probably not contain the encrypted password.
DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature;
o bobcat_3.01.00-x.tar.gz: source archive;
o bobcat_3.01.00-x_i386.changes: change log;
o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::User(3bobcat)