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
CipUX::RPC::Server(3pm) 				User Contributed Perl Documentation				   CipUX::RPC::Server(3pm)

NAME
CipUX::RPC::Server - RPC server class for CipUX VERSION
version 3.4.0.9 SYNOPSIS
use CipUX::RPC::Server; DESCRIPTION
Provides the functions for CipUX RPC server. ABSTRACT
The CipUX rpc server is a generic abstract class, which can be used by other classes or scripts. SUBROUTINES
/METHODS The following functions are implemented or supported by CipUX::RPC::Server. BUILD Constructor, see new. DEMOLISH Destructor. new Constructor Syntax: my $cipux_rpc = CipUX::RPC::Server->new(); check_authentication Check weather the login has access or not. is_ticket_bad Return 1 if a ticket is OK otherwise 0; signal_handler Install signal_handler alias time to die. Syntax: $server->signal_handler({}); answer_requests Answer Requests. Syntax: $server->answer_requests({ port=>8000, address=>'localhost', reuse=>0, proto=>'tcp', meth_hr=>TODO task_hr=>TODO }); check_access_to_task Check the access for login to a task. check_access_to_rpc_intern Check the access for login to the rpc_intern section. check_access_to_cat_module Check the access for login to a CAT module. error Construct an error message. evaluate_access Evaluate the access to login or a given user depending on the sub command (subcmd) of rpc_info or rpc_intern for one or more realms. Known realms are: task, cat_module, rpc_intern. update_task Check and update tasks entries. update_cat_module Check and update CAT modules entries. log2syslog Log a given message to syslog. get_config Return the value for a given configuration variable. rpc_list_functions List the rpc functions. rpc_start Start the RPC server. Syntax: $server->rpc_start({}); ping The function 'ping' is for testing the connection. It requires not to log in and no arguments. It returns 'OK'. version Return the CipUX version. sum The function 'sum' is for testing the connection. It requires not to log in and 2 arguments. It returns the sum of the arguments as a hash reference with a single line. login Perform a login. logout Perform a logout. session Check the ticket and if it is valid update and return a new ticket. ttl Return the Time To Live. Default 900 seconds. rpc_task Execute a CipUX::Task. rpc_info Execute a rpc_info sub-command. task_access Needs parameter: TASK task_access_survey Needs parameter: TASK [TASK] ... cat_module_access Needs parameter: MODULE cat_module_access_survey Needs parameter: MODULE [MODULE] ... rpc_intern_access Needs parameter: COMMAND rpc_intern_access_survey Needs parameter: COMMAND [COMMAND] ... rpc_intern Execute a rpc_intern sub-command. ttl Prints current TTL in seconds cat_module_cache_size Prints current cat module cache size rpc_intern_cache_size Prints current rpc intern cache size task_cache_size Prints current task_cache_size of cache user_task_access Needs parameter: USER TASK user_task_access_survey Needs parameter: $USER TASK [TASK] ... user_cat_module_access Needs parameter: USER MODULE user_cat_module_access_survey Needs parameter: USER MODULE [MODULE] ... user_rpc_intern_access Needs parameter: USER COMMAND user_rpc_intern_access_survey Needs parameter: USER COMMAND [COMMAND] ... flush_cache Flush RPC server RBAC cache Public XML-RPC functions. All the following CipUX::Task methods are public. Public means that they could be executed remotely. Public means not that everybody can do this remotely. There are two kinds of public functions:(1) Functions without authorization - login - ping - sum(2) Every other function is available only after using 'login' function, with a uid as first parameter and a valid ticket as second parameter. Examples (pseudo code): - (reference to user list) = cipux_task_list_users( uid, ticket ); - (true|false) = logout( uid, ticket ); - (new ticket|false) = session( uid, ticket ); If the uid do not match, or the uid has not the authorization to use the function, or the group of the uid has not the authorization to use the function, or the ticket is expired, or the ticket is not valid the request will not be fulfilled. In other words: if the uid match and has the right and the role also has the right and the ticket is valid and is not expired, the request will be executed. To see real examples have a look at CipUX::RPC::Client client. DIAGNOSTICS
TODO CONFIGURATION AND ENVIRONMENT
Need no environment variables. But do need a configuration file. For example cipux-rpc.ini DEPENDENCIES
Authen::Simple::PAM Authen::Simple::Password Carp CipUX::Task CipUX::RBAC::Simple Class::Std Data::Dumper English Frontier::Daemon Frontier::RPC2 List::MoreUtils Log::Log4perl Log::Dispatch POSIX Readonly Ticket::Simple INCOMPATIBILITIES
Not known. BUGS AND LIMITATIONS
Not known. SEE ALSO
See the CipUX webpage and the manual at <http://www.cipux.org> See the mailing list http://sympa.cipworx.org/wws/info/cipux-devel <http://sympa.cipworx.org/wws/info/cipux-devel> AUTHOR
Christian Kuelker <christian.kuelker@cipworx.org> LICENSE AND COPYRIGHT
Copyright (C) 2007 - 2010 by Christian Kuelker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA perl v5.14.2 2012-01-04 CipUX::RPC::Server(3pm)
All times are GMT -4. The time now is 02:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy