Sponsored Content
Top Forums Shell Programming and Scripting comment and Uncomment single task out of multiple task Post 302206690 by Franklin52 on Wednesday 18th of June 2008 08:48:13 AM
Old 06-18-2008
If you want to comment the "TASK gsnmpproxy" you can something like:

Code:
awk '/TASK gsnmpproxy/{f=1} f{$0="#"$0} /\}/&&f{f=0} 1' file

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse an XML task list to create each task.xml file

I have an task definition listing xml file that contains a list of tasks such as <TASKLIST <TASK definition="Completion date" id="Taskname1" Some other <CODE name="Code12" <Parameter pname="Dog" input="5.6" units="feet" etc /Parameter> <Parameter... (3 Replies)
Discussion started by: MissI
3 Replies

2. Shell Programming and Scripting

Comment/uncomment a cron

Hi, My requirement is to comment/uncomment a cron job through a script. 1. Redirected the output of crontab -l to a text file. crontab -l >cronoutput.txt 2. grep to find the script running and sed to place the comment (#) as the first char grep -i 'weblogicmonitor.sh'... (5 Replies)
Discussion started by: mannepalli
5 Replies

3. Shell Programming and Scripting

comment and uncomment a line with Shell Script

Requirement is: 1. comment and uncomment the line with Shell Script: /opt/admin/fastpg/bin/fastpg.exe -c -=NET (using fastpg.exe as a search option) 2. display = "Commented" (when its commented) and display = "Uncommented" (when its uncommented) Its urgent, please let me asap!!! Thanks in... (2 Replies)
Discussion started by: anthonyraj75
2 Replies

4. Shell Programming and Scripting

uncomment or comment one specific line in a config file

Hello. I want comment or uncomment a ligne in a config file. The file name : /etc/samba/smb.conf Normaly the ligne is uncomment :so the line begin with a tab character followed by passdb backend =\tpassdb backend = In that case I should comment this line ... (2 Replies)
Discussion started by: jcdole
2 Replies

5. Shell Programming and Scripting

task

Hi all, I'm newbie and stuck here. Thanks for any help. Input(txt file) a b X c d Y e f Z g h W Requested output: a b X Y c d Y X e f Z W g h W Z Please use code tags when posting data and code samples! (10 Replies)
Discussion started by: hernand
10 Replies

6. Shell Programming and Scripting

Task

Hi experts, I have a problem with the below shell task: I need to modify the file creatin a paired row , per each row which matches filter (e.g. number of nonempty columns = 5) Output should look like this: second row is original one from the input, first row(red) is pairing row, it's... (29 Replies)
Discussion started by: hernand
29 Replies

7. Shell Programming and Scripting

comment/uncomment grep output

Hi I need help to comment/uncomment the output from grep command output within a file from command line using shell script. # grep -i -p testfs filesystem.out /TestFs: dev = /dev/TestFslv vfs = jfs2 log = /dev/hd8 mount ... (2 Replies)
Discussion started by: mbak
2 Replies

8. Shell Programming and Scripting

need a script that does a simple task on multiple unix servers.

hi guys, i need a script that does a simple task on multiple aix servers. if possible with both telnet and ssh. the simple task i wanna do is connect to a server and run "ifconfig -a" and get the output. nextweek i need to do similar jobs on like 50 servers... :( can anybody help me with making... (2 Replies)
Discussion started by: curtis911
2 Replies

9. UNIX for Dummies Questions & Answers

Easiest way to comment/uncomment a shell script?

cd path line1 line2 line3 line4 line5 Lets say thats the sample script...So say if i have to comment the above script, which would be the better way so that whenever i want, i cud comment or uncomment the same. Thanks (1 Reply)
Discussion started by: saggiboy10
1 Replies

10. Shell Programming and Scripting

To comment/uncomment in config file

hi! I want to comment and uncomment 2 lines in my config files that goes like: CONTACT_LIST="abc@xyz.com;" #CONTACT_LIST="def@xyz.com;" I want to sawp the commnets in above lines and desired output should be: #CONTACT_LIST="abc@xyz.com;" CONTACT_LIST="def@xyz.com;" Please suggest. (1 Reply)
Discussion started by: scriptNovice
1 Replies
Slurm::Stepctx(3pm)					User Contributed Perl Documentation				       Slurm::Stepctx(3pm)

NAME
Slurm::Stepctx - Step launching functions in libslurm SYNOPSIS
use Slurm; $slurm = Slurm::new(); $params = {job_id => 1234, ...}; $ctx = $slurm->step_ctx_create($params); $rc = $ctx->launch({...}, {task_start => sub {...}, task_finish => sub {...} }); DESCRIPTION
The Slurm::Stepctx class is a wrapper of the job step context and step launching functions in libslurm. This package is loaded and bootstraped with package Slurm. METHODS
STEP CONTEXT CREATION FUNCTIONS Please see "SLURM TASK SPAWNING FUNCTIONS" in Slurm for step context creation functions. STEP CONTEXT MANIPULATION FUNCTIONS $rc = $ctx->get($ctx_key, ...); Get parameters from a job step context. o INPUT $ctx_key: type of the parameter to get. Supported key and the corresponding result data are: o $rc = $ctx->get(SLURM_STEP_CTX_STEPID, $stepid); Get the created job step id. $stepid will be set to the step id number. o $rc = $ctx->get(SLURM_STEP_CTX_TASKS, $tasks); Get array of task count on each node. $tasks will be set to an array reference. o $rc = $ctx->get(SLURM_STEP_CTX_TID, $nodeid, $tids); Get array of task IDs for specified node. $nodeid specifies index of the node. $tids will be set to an array reference. o $rc = $ctx->get(SLURM_STEP_CTX_RESP, $resp); TODO: this is not exported. Get job step create response message. o $rc = $ctx->get(SLURM_STEP_CTX_CRED, $cred); Get credential of the created job step. $cred will be an opaque object blessed to "Slurm::slurm_cred_t". o $rc = $ctx->get(SLURM_STEP_CTX_SWITCH_JOB, $switch_info); Get switch plugin specific info of the step. $switch_info will be an opaque object blessed to "Slurm::switch_jobinfo_t". o $rc = $ctx->get(SLURM_STEP_CTX_NUM_HOSTS, $num); Get number of nodes allocated to the job step. o $rc = $ctx->get(SLURM_STEP_CTX_HOST, $nodeid, $nodename); Get node name allocated to the job step. $nodeid specifies index of the node. o $rc = $ctx->get(SLURM_STEP_CTX_JOBID, $jobid); Get job ID of the job step. o $rc = $ctx->get(SLURM_STEP_CTX_USER_MANAGED_SOCKETS, $numtasks, $sockets); Get user managed I/O sockets. TODO: describe the parameters. o RET: error code. $rc = $ctx->daemon_per_node_hack(); Hack the step context to run a single process per node, regardless of the settings selected at Slurm::Stepctx::create() time. o RET: error code. STEP TASK LAUNCHING FUNCTIONS $rc = $ctx->launch($params, $callbacks); Launch a parallel job step. o IN $params: parameters of task launching, with structure of "slurm_step_launch_params_t". o IN $callbacks: callback functions, with structure of "slurm_step_launch_callbacks_t". NOTE: the callback functions will be called in a thread different from the thread calling the "launch()" function. o RET: error code. $rc = $ctx->launch_wait_start(); Block until all tasks have started. o RET: error code. $ctx->launch_wait_finish(); Block until all tasks have finished (or failed to start altogether). $ctx->launch_abort(); Abort an in-progress launch, or terminate the fully launched job step. Can be called from a signal handler. $ctx->launch_fwd_signal($signo); Forward a signal to all those nodes with running tasks. o IN $signo: signal number. SEE ALSO
Slurm AUTHOR
This library is created by Hongjia Cao, <hjcao(AT)nudt.edu.cn> and Danny Auble, <da(AT)llnl.gov>. It is distributed with SLURM. COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-03-16 Slurm::Stepctx(3pm)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy