11-23-2018
On top of what bakunin already said, I'd like to add a few comments:
- Did you consider the readarray / mapfile bash builtin for populating the array?
- Why arrays at all? Read the URL- file immediately for the curl command.
- You reference $countline twice but nowhere assign to it?
This User Gave Thanks to RudiC For This Post:
9 More Discussions You Might Find Interesting
1. Programming
Hi,
Am supposed to use message queues to send and receive messages between the processes. when i was working on that i realised that the message qid and the message queue related data should be maintained in a shared memory so that it can be accessed by all the processes. Could anybody refer... (10 Replies)
Discussion started by: rvan
10 Replies
2. Programming
Hi,
I'm trying to compile the following code:
/************** Begin <test.c> ***************/
/*
* Compiled with: gcc -Wall -o test test.c
*/
#include <stdio.h>
#include <unistd.h>
int main(void)
{
printf("I'm process %d, son of %d \n", getpid(), getppid());
printf("Hello \n");... (3 Replies)
Discussion started by: djodjo
3 Replies
3. Programming
Hi,
I'm trying to compile the following code:
/************** Begin <test.c> ***************/
/*
* Compiled with: gcc -Wall -o test test.c
*/
#include <stdio.h>
#include <unistd.h>
int main(void)
{
printf("I'm process %d, son of %d \n", getpid(), getppid());
... (5 Replies)
Discussion started by: djodjo
5 Replies
4. Shell Programming and Scripting
Hi
I want to do something that might sound strange.
I have a code that in written in C and is executed at startup (it's a custom process). It occasionally calls some bash scripts.
The process doesn't have any terminal associated with it.
One thing I don't know how to do is to start a... (5 Replies)
Discussion started by: alirezan
5 Replies
5. High Performance Computing
I read that 'Any single program that can run as multiple processes can benefit from OpenMosix: "The GIMP" photo editor and the "kandel" fractal generator are known to do this.
Are there other load-balancing clusters that do support multi-process applications? (1 Reply)
Discussion started by: Advice Pro
1 Replies
6. Shell Programming and Scripting
Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know.
More detail.
ScriptA (bash), ScriptB (ksh), ScriptC (bash)
ScriptA, launches ScriptB
ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies
7. Shell Programming and Scripting
hey everyone,
I'm having some trouble breaking down some code. It's simple a control script that takes machines meant to be backed up from a list. Then according to that will run multi-threaded processes up until the specified thread limit.
for example if there are 4 machines to be backed up,... (2 Replies)
Discussion started by: terrell
2 Replies
8. Programming
So I am trying to learn C and am coding some scripts on my own.
For a start I have decided to port the shell script developed by wisecracker into C.( Here is the link to that script A simple reminder script for beginners to shell scripting. | Unix Linux Forums | OS X (Apple) )
This is what I... (7 Replies)
Discussion started by: chacko193
7 Replies
9. Shell Programming and Scripting
Hi, I'm developing a script which contains a multi dimensional array, however for some reason the array is not iterating.
When executing the script, services are listed as arguments from argument 2. Ex voice data sms.
service=${@:2};
for services in $service
do
... (2 Replies)
Discussion started by: nms
2 Replies
LEARN ABOUT DEBIAN
grid-mapfile-add-entry
GRID-MAPFILE-ADD-(8) Globus Commands GRID-MAPFILE-ADD-(8)
NAME
grid-mapfile-add-entry - Add an entry to a gridmap file
SYNOPSIS
grid-mapfile-add-entry [-help] [-usage] [-version] [-versions]
grid-mapfile-add-entry {-dn DISTINGUISHED-NAME} {-ln LOCAL-NAME...}
[[-d] | [-dryrun]]
[[-mapfile MAPFILE] | [-f MAPFILE]]
DESCRIPTION
The grid-mapfile-add-entry program adds a new mapping from an X.509 distinguished name to a local POSIX user name to a gridmap file.
Gridmap files are used as a simple authorization method for services such as GRAM5 or GridFTP.
The grid-mapfile-add-entry program verifies that the LOCAL-NAME is a valid user name on the system on which it was run, and that the
mapping between DISTINGUISHED-NAME and LOCAL-NAME does not already exist in the gridmap file.
By default, grid-mapfile-add-entry will modify the gridmap file named by the GRIDMAP environment variable if present, or the file
/etc/grid-security/grid-mapfile if not. This can be changed by the use of the -mapfile or -f command-line options.
If the gridmap file does not exist, grid-mapfile-add-entry will create it. If it already exists, grid-mapfile-add-entry will save the
current contents of the file to a new file with the string .old appended to the file name.
The full set of command-line options to grid-mapfile-add-entry are:
-help, -usage
Display the command-line options to grid-mapfile-add-entry.
-version, -versions
Display the version number of the grid-mapfile-add-entry command. The second form includes more details.
-dn DISTINGUISHED-NAME
The X.509 distinguished name to add a mapping for. The name should be in OpenSSL's oneline format.
-ln LOCAL-NAME...
The POSIX user name to map the distinguished name to. This name must be a valid username. Add multiple LOCAL-NAME strings after the -ln
command-line option. If any of the local names are invalid, no changes will be made to the gridmap file. Note that if multiple
occurances of the -ln command-line option are present, only the the last one will be added.
-d, -dryrun
Verify local names and display diagnostics about what would be added to the gridmap file, but don't actually modify the file.
-mapfile MAPFILE, -f MAPFILE
Modify the gridmap file named by MAPFILE instead of the default.
EXAMPLES
Add a mapping between the current user's certificate to the current user id to a gridmap file in $HOME/.gridmap:
% grid-mapfile-add-entry -f $HOME/.gridmap -dn "`grid-cert-info -subject`" -ln "`id -un`"
Modifying /home/juser/.gridmap ...
/home/juser/.gridmap does not exist... Attempting to create /home/juser/.gridmap
New entry:
"/DC=org/DC=example/DC=grid/CN=Joe User" juser
(1) entry added
Add a mapping between the a distinguished name and multiple local names:
% grid-mapfile-add-entry -dn "/DC=org/DC=example/DC=grid/CN=Joe User" juser" local1 local2
Modifying /home/juser/.gridmap ...
/home/juser/.gridmap does not exist... Attempting to create /home/juser/.gridmap
New entry:
"/DC=org/DC=example/DC=grid/CN=Joe User" local1,local2
(1) entry added
ENVIRONMENT VARIABLES
The following environment variables affect the execution of grid-mapfile-add-entry:
GRIDMAP
Path to the default gridmap to modify.
FILES
The following files affect the execution of grid-mapfile-add-entry:
/etc/grid-security/grid-mapfile
Path to the default gridmap to modify if GRIDMAP environment variable is not set.
SEE ALSO
grid-mapfile-check-consistency(8), grid-mapfile-delete-entry(8)
AUTHOR
University of Chicago
Globus Toolkit 5.0.1 03/19/2010 GRID-MAPFILE-ADD-(8)