10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
I have written simple script below to check if ip is added to interface
#!/usr/local/bin/bash
IFCONFIG="/sbin/ifconfig"
SERVICE="/usr/sbin/service"
IP="79.137.X.X"
GREP=$(${IFCONFIG} | grep ${IP})
ip_quantity_check () {
echo ${GREP} | wc -l
}
if ];... (2 Replies)
Discussion started by: bryn1u
2 Replies
2. UNIX for Advanced & Expert Users
I ran into the following and still do not understand entirely the rationale behind this. If someone could explain why things are as they are I'd be thankful.
The following was tested on AIX 7.1 with ksh88, but i suspect that to be ubiquitous. In an installation routine i had to create a set of... (6 Replies)
Discussion started by: bakunin
6 Replies
3. UNIX for Advanced & Expert Users
All,
I am getting error when run file check with test operator . Why is it showing the error
if
then
echo 'file found'
fi
ksh: -r: unknown test operator
I know i can use the below code to test the file but why the above is not working
if test -r filename
... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
4. Shell Programming and Scripting
I have found a code some where, which looks like
if (test $value)
then
<do something>
fi
I am not understanding what is test doing here. I have seen test with !,-eq, -e etc.
But, the above appears to be a new one to me.
Can anyone please expalin me. (4 Replies)
Discussion started by: mady135
4 Replies
5. Solaris
Hi
anybody know how to test out the UDP port working?
cos UDP cannot use telnet to test...
Sumemr (2 Replies)
Discussion started by: summerpeh
2 Replies
6. UNIX for Advanced & Expert Users
Hi,
I found this:
https://www.unix.com/unix-advanced-expert-users/27318-how-see-function-shell.html
which indicates I can use typeset -f to list the functions.
But it also lists the contents of the functions. Is there a
lighter weight way to see what is defined? Is there an
internal... (5 Replies)
Discussion started by: duderonomy
5 Replies
7. Programming
Hi everybody,
I need to check in C program whether a given login is known on the system. Is there any system function that could do this ?
So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (2 Replies)
Discussion started by: xavier054
2 Replies
8. Shell Programming and Scripting
#!/bin/ksh
size=3978132853
limit=100
if ;then
echo exceeded limit
fi
This does not work though if i reduce 3978132853 to 397813285 it works any ideas and work around appreciated
(SunOS 5.9 Generic_117171-02 sun4u sparc SUNW,Ultra-80 ) (2 Replies)
Discussion started by: zam
2 Replies
9. Shell Programming and Scripting
I need to write a function that will work in sh/ksh shell that will test to see if a file has already been opened for writting by another user
has anyone written something like this? (3 Replies)
Discussion started by: johnsonbryce
3 Replies
10. Programming
Hi everyone ,
Is there any predefined C function that tests whether an input is string or an integer?
Thank's in advance :) (3 Replies)
Discussion started by: qqq
3 Replies