Sponsored Content
Top Forums Shell Programming and Scripting comment and Uncomment single task out of multiple task Post 302206673 by madhusmita on Wednesday 18th of June 2008 08:02:00 AM
Old 06-18-2008
comment and Uncomment single task out of multiple task

I have a file contains

TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}

TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe


I would like to comment and than uncomment specific task eg TASK gsnmpproxy

Pls suggest how to do in shell script
 

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
DNTASK(1)						      General Commands Manual							 DNTASK(1)

NAME
dntask - Execute VMS command procedures SYNOPSIS
dntask [options] command-procedure Options: [-biVh] [-t timeout] DESCRIPTION
dntask runs command procedures on a remote VMS system. It takes advantage of the ability of the TASK object in DECnet to execute an arbitrary command procedure located in the users' login direc- tory. The remote command procedure should output to SYS$NET rather than SYS$OUTPUT and (if interactive) read it's input also from SYS$NET. The VMS equivalent of the (non-interactive version) command would be TYPE node::"TASK=command-procedure" For some example command procedures see the tasks directory of the source distribution. show_system.com is a non-interactive task that simply displays the output of the VMS "SHOW SYSTEM" command on standard output. interactive.com is an interactive task that allows you to enter DCL commands to be executed on the host VMS system. Be careful which commands you enter because they will expect input to come from the network connection, for instance programs that do screen orientated input or output will almost certainly not work. Task names can be up to 16 characters in length because that's the limit on DECnet object names. OPTIONS
-b Send the output in binary mode. By default the output from the DECnet task is assumed to be records. This option sends the data "as is" so you can put commands like BACKUP in the task and backup to your Linux box. -i Interact with the command procedure. The command procedure must be written to be interactive by reading from and writing to SYS$NET. Specifying -i for a non-interactive command procedure will cause dntask to time-out waiting for input. Not specifying -i for an interactive command procedure will cause it to exit prematurely at the VMS end. -t timeout Specifies the timeout in seconds for interactive command procedures. If no input has been received from either standard input or the VMS end in this time then dntask will exit. The default is 60 seconds. If the value 0 is given then dntask will wait forever (or until you kill it). -T connect timeout Specifies the maximum amount of time the command will wait to establish a connection with the remote node. a 0 here will cause it to wait forever. The default is 60 seconds -h -? Displays help for using the command. -V Show the version of the tools package that dntask comes from. NOTES
The command procedure that you write MUST ALWAYS write something to SYS$NET or you will get a "connection refused" message. This is a limi- tation with DECnet objects. eg. If you write a task to start a remote DECterm it would look something like this: $ remnode=f$element(0, ":", "''f$trnlnm("sys$rem_node")'") $ set display/create/node='remnode' $ create/term/detach $ def/nolog sys$output sys$net $ write sys$output "DECterm started on ''remnode'" $ exit The "write" command near the end is essential. EXAMPLES
dntask 'myvax::show_system' dndir -i 'tramp"christine pjc123"::interactive' dndir -i 'tramp"christine -"::interactive' Specifying "-" in the password field will prompt for the password. SEE ALSO
dntype(1), dndir(1), dncopy(1), dndel(1) DECnet utilities September 25 1998 DNTASK(1)
All times are GMT -4. The time now is 10:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy