03-10-2006
i think you can also do it using the "test -t" but can't seem to figure out the syntax - has anyone done this?
10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Advanced & Expert Users
Hello everyone,
I' m currently working on an open source project and I'm looking for people willing to test the software on various platforms so that we'll be able to publish a compatibility list.
The project is called CorneliOS, it's a webOS and web application framework, and it has been... (0 Replies)
Discussion started by: joskirps
0 Replies
3. Shell Programming and Scripting
Hello All,
Can somebody help me with this script. I have an output file with a list of servers ips and ports. I need to be able to run this script to list all the server ips in the outfile and find out if the port is open or not.
#!/bin/sh
IFS=#;for i in $(cat portTest);
do
# check... (2 Replies)
Discussion started by: liketheshell
2 Replies
4. 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
5. 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
6. Shell Programming and Scripting
Help Please perl Gurus,
I am trying to add ungrouped passengers in a group and I creating a script however it fails on first step only I tried all the options it returns following error.
syntax error at junki line 4, near "open "
Execution of junki aborted due to compilation errors. ... (2 Replies)
Discussion started by: dynamax
2 Replies
7. 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
8. Shell Programming and Scripting
i am writing the following snippet and cannot figure out why the variable measType remains 0. it should be 1
I also tried "\#analog" and '\#analog' in the test statement and it still doesn't work. What is going on?
bash$ measType=0
bash$ read line < 2iconfig.ini
bash$ echo $line
#analog... (4 Replies)
Discussion started by: oahmad
4 Replies
9. Shell Programming and Scripting
Hello all, just a quick little part of code i'm writing to check if the file i'm writing too in my automatic process is not being written too manually.
#!/bin/bash
FUSER=$(/sbin/fuser -s /toto.tmp >/dev/null 2>&1)
LSOF=$(/usr/sbin/lsof | grep -q "toto.tmp")
PGREP=$(pgrep -f "toto.tmp" >... (6 Replies)
Discussion started by: maverick72
6 Replies
10. 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
suspend(1) User Commands suspend(1)
NAME
suspend - shell built-in function to halt the current shell
SYNOPSIS
sh
suspend
csh
suspend
ksh
suspend
DESCRIPTION
sh
Stops the execution of the current shell (but not if it is the login shell).
csh
Stop the shell in its tracks, much as if it had been sent a stop signal with ^Z. This is most often used to stop shells started by su.
ksh
Stops the execution of the current shell (but not if it is the login shell).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), kill(1), ksh(1), sh(1), su(1M), attributes(5)
SunOS 5.10 15 Apr 1994 suspend(1)