10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
2. Shell Programming and Scripting
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
3. Shell Programming and Scripting
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies
4. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
5. Boot Loaders
Hello,
I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error
" reboot and select proper Boot device or insert Boot media in select Boot device and press a key "
I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies
6. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
7. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
8. Programming
hello socket programming expert,
I having difficulties in understanding how select() function in socket programming work.... I'm trying to create my own peer-to-peer chat or file transfer program by using the select() function.... Therefore does anyone had any tutorial or source code that... (4 Replies)
Discussion started by: draggy
4 Replies
9. Shell Programming and Scripting
Hi folks,
As we all know, the "select" function give a number to each element as the number of elements in the select.
for example:
I have a program which ask a user to select a language:
===============================================================================
Please select the... (1 Reply)
Discussion started by: nir_s
1 Replies
10. Programming
i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies
PSELECT(2) BSD System Calls Manual PSELECT(2)
NAME
pselect -- synchronous I/O multiplexing a la POSIX.1g
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sys/select.h>
int
pselect(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds, const struct timespec *restrict timeout,
const sigset_t *restrict sigmask);
DESCRIPTION
The pselect() function was introduced by IEEE Std 1003.1g-2000 (``POSIX.1'') as a slightly stronger version of select(2). The nfds, readfds,
writefds, and errorfds arguments are all identical to the analogous arguments of select(). The timeout argument in pselect() points to a
const struct timespec, rather than the (modifiable) struct timeval used by select(); as in select(), a null pointer may be passed to indicate
that pselect() should wait indefinitely. Finally, sigmask specifies a signal mask which is set while waiting for input. When pselect()
returns, the original signal mask is restored.
See select(2) for a more detailed discussion of the semantics of this interface, and for macros used to manipulate the fd_set data type.
RETURN VALUES
The pselect() function returns the same values and under the same conditions as select().
ERRORS
The pselect() function may fail for any of the reasons documented for select(2) and (if a signal mask is provided) sigprocmask(2).
SEE ALSO
kqueue(2), poll(2), select(2), sigprocmask(2)
STANDARDS
The pselect() function conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
The pselect() function first appeared in FreeBSD 5.0.
AUTHORS
The pselect() manual page was written by Garrett Wollman <wollman@FreeBSD.org>.
BSD
June 16, 2002 BSD