![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Automated FTP task | LowOrderBit | IP Networking | 36 | 05-04-2009 03:45 AM |
| process vs task | hana | UNIX for Dummies Questions & Answers | 2 | 07-02-2006 06:32 PM |
| cron task not working | cassj | Shell Programming and Scripting | 2 | 08-05-2004 04:45 PM |
| difference between task and process | ramyar | UNIX for Dummies Questions & Answers | 6 | 12-22-2001 08:48 PM |
| Linux task applet | ghoti | UNIX for Dummies Questions & Answers | 2 | 12-13-2001 02:10 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
Use a # at starting of line which is to commented with in the script.
e.g. #!/bin/bash # mycommand command1 in this script the command line mycommand will not get executed... and to uncommant remove # from there. |
|
||||
|
When I run this command from other server through ssh ...ssh is workinf fine..here X,Y,Z is used for ssh
${X} -l ${Y} ${Z} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; awk '/TASK gsnmpproxy/{f=1} f{$0="#"$0} /\}/&&f{f=0} 1' filename" it gives error like awk: syntax error near line 1 awk: bailing out near line 1 So please suggest above one or please write how to comment a line in a file if the that line is INDIA. |
| Sponsored Links | ||
|
|