08-30-2011
Thanks for your reply. We need to change from BASH to KSH with in the same script. Reason being some of the environment related settings are done using BASH.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Buddy,
Can any one help me to overcome from the below problem?
#/usr/bin/ksh
typeset -Z dd
dd=1
echo $dd
===========
out put for the above is 01
same script I'm migrating to bash but typeset -Z option is not found in bash, Pls get me the equivalent option in BASH
Thanks in... (1 Reply)
Discussion started by: krishna
1 Replies
2. Shell Programming and Scripting
Hello,
I've written a script in KSH, but now it needs to run on a system without KSH, ie sh or bash etc, bash seems best bet, but the simplest of things don't seem to work..
The snippet below is the main issue, basically I'm reading from a dat file and putting fields into arrays..
Dat file... (5 Replies)
Discussion started by: itsupplies
5 Replies
3. Shell Programming and Scripting
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies
4. Shell Programming and Scripting
Hi guys...
I have a ksh shell by default, so when I login to my unix box, all my .profile statements gets executed(including the aliases).
But for some reasons(may be not comfortable using ksh), I would always switch to BASH(in the same session but as a child process) but in the process I am... (16 Replies)
Discussion started by: anduzzi
16 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I am a new bie to unix shell programming. I have specified ksh as the first line in my script but when executed it complains.
*********** Script=test********************
#!/usr/bin/ksh
echo hello
print -p 123
************************************
++++++++ Execution... (7 Replies)
Discussion started by: akhilnagpal
7 Replies
6. Solaris
Hi,
I've a general question regarding shell. I 've seen that every where i worked in production environment people are using ksh .. but i like to use .. bash .. is there any particular reason why hardcore sysadmins use ksh ? (8 Replies)
Discussion started by: fugitive
8 Replies
7. UNIX for Dummies Questions & Answers
I'm a user on a fairly locked down sys V server. By default, I have ksh set as my default shell. I added to my .profile:
bash -o vi
so when I login, it goes into bash so I can take advantage of tab completion and use the up key to bring up previous commands. However, whenever I want to exit, I... (2 Replies)
Discussion started by: mrwatkin
2 Replies
8. Shell Programming and Scripting
what is diff between KSH and Bash can you tell me some commands which run in either of two but not in both.
while doing normal shell programming I am unable to find diffrence between two (2 Replies)
Discussion started by: pasricha.kunal
2 Replies
9. Shell Programming and Scripting
Hi all
Below code works in bash but it is not working in ksh.
enddate=`date -d "$enddate + $i day" "+%Y_%m_%d"`
Please help me how it works in ksh
Thanks (10 Replies)
Discussion started by: pmreddy
10 Replies
10. Shell Programming and Scripting
Hello,
I want to run a script written in ksh but my default shell is bash as root e.g in the script it has #!/bin/ksh
i have gone into /etc/passwd to change it from :/bin/bash to /bin/ksh
but still giving me an error when running scripts such as ./installer
-bash: ./installer: /bin/ksh:... (3 Replies)
Discussion started by: DOkuwa
3 Replies
pg2(3erl) Erlang Module Definition pg2(3erl)
NAME
pg2 - Distributed Named Process Groups
DESCRIPTION
This module implements process groups. The groups in this module differ from the groups in the module pg in several ways. In pg , each mes-
sage is sent to all members in the group. In this module, each message may be sent to one, some, or all members.
A group of processes can be accessed by a common name. For example, if there is a group named foobar , there can be a set of processes
(which can be located on different nodes) which are all members of the group foobar . There are no special functions for sending a message
to the group. Instead, client functions should be written with the functions get_members/1 and get_local_members/1 to find out which pro-
cesses are members of the group. Then the message can be sent to one or more members of the group.
If a member terminates, it is automatically removed from the group.
Warning:
This module is used by the disk_log module for managing distributed disk logs. The disk log names are used as group names, which means that
some action may need to be taken to avoid name clashes.
EXPORTS
create(Name) -> void()
Types Name = term()
Creates a new, empty process group. The group is globally visible on all nodes. If the group exists, nothing happens.
delete(Name) -> void()
Types Name = term()
Deletes a process group.
get_closest_pid(Name) -> Pid | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_process, Name} | {no_such_group, Name}
This is a useful dispatch function which can be used from client functions. It returns a process on the local node, if such a
process exist. Otherwise, it chooses one randomly.
get_members(Name) -> [Pid] | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Returns all processes in the group Name . This function should be used from within a client function that accesses the group. It is
therefore optimized for speed.
get_local_members(Name) -> [Pid] | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Returns all processes running on the local node in the group Name . This function should to be used from within a client function
that accesses the group. It is therefore optimized for speed.
join(Name, Pid) -> ok | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Joins the process Pid to the group Name . A process can join a group several times; it must then leave the group the same number of
times.
leave(Name, Pid) -> ok | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Makes the process Pid leave the group Name . If the process is not a member of the group, ok is returned.
which_groups() -> [Name]
Types Name = term()
Returns a list of all known groups.
start()
start_link() -> {ok, Pid} | {error, Reason}
Types Pid = pid()
Reason = term()
Starts the pg2 server. Normally, the server does not need to be started explicitly, as it is started dynamically if it is needed.
This is useful during development, but in a target system the server should be started explicitly. Use configuration parameters for
kernel for this.
SEE ALSO
kernel(7) , pg(3erl)
Ericsson AB kernel 2.14.3 pg2(3erl)