For my understanding
sed -i "/${line}/ s/^/# /" $F_NAME ==> in file $F_NAME search for occurence of $line and then look at the first position for # and replace it by a space ?
and
sed -i "/${line}/ s/# *//" $F_NAME ==> in file $F_NAME search for occurence of $line and then look somewhere for a space followed by everything and replace it by a # ?
That mean that the space should be not at the 1st position of the line ?
Hi I need to add a comment line at the begining of a text file. The scenario is given below.
1. The number of servers that needs to be updated is around 80
2. The location of the text file in all the servers are the same including the file name.
3. The comment has to be added at the very... (2 Replies)
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 (9 Replies)
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)
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)
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)
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)
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)
Hi guys
I am making a bash script, need to un-comment a line remove the"#"
Want to accomplish this with a Perl command.
Line is like this:
#readclients = yes
Need it like this:
readclients = yes
Any help would be really appreciated. (3 Replies)
Hi,
I need to comment out (insert # in the front of a line) a line that has entry Defaults requiretty using command-line as I need to do this on hundreds of servers.
From
Defaults requiretty
To
#Defaults requiretty
I tried something like below but no luck: Please advise,... (3 Replies)
Hi Folks,
sed -i '3s/^/#/' abc.txt is commenting the line number 3 in LINUX
Not Working in Solaris 10 or higher
sed -i sed -i '3s/^/#/' abc.txt
sed: illegal option -- i
i have a file as below
cat abc.txt
bc
vdv
shhsd
cdc
skdk
Please advise (15 Replies)
Discussion started by: abhaydas
15 Replies
LEARN ABOUT SUSE
isdnformat
isdnformat(5) Linux System Administration isdnformat(5)NAME
isdnformat - common isdn config file format
DESCRIPTION
This man page describes the format of all isdn config files.
FORMAT
Empty lines are ignored.
If a # is encountered, this character and the rest of the line is ignored (it's considered a comment). You can prepend a backslash to
prevent this and use the # character.
If the last character of a line is a backslash , the next line is a continuation of the current line.
The file format is like smb.conf or win.ini: there are sections and entries within the section. However, the syntax was expanded with sub-
sections; these can be nested as often as you like.
All whitespace (space and tabs) at the end of the line are ignored.
Section and entry names are case insensitive.
Values are case sensitive, of course (the case is preserved).
Section and entry names may not use the characters "*?|&/"; if one of these is encountered, it is ignored.
At the beginning of the line you may use as much whitespace as you like.
A section has the format "[" NAME "]". You may use whitespace between the braces and the name, or none at all.
An entry has the format ENTRY "=" VALUE. You may use whitespace before and after the equal sign, or none at all.
A subsection starts with ENTRY "=" "{" and ends with "}". You may use sections, entries and subsections between the start and the end tag.
Beware: unlike samba or windows the semicolon is not used for comments !
You can use INCLUDE(File) to include a file. If the filename is not absolute, it's considered relative to the directory of the including
document. You may use it anywhere in a file, but there may be no space characters in the file!
All subsections started in an include file must end in that include file, so the number of opened and closed brackets must match.
Beware: recursive including will cause the program to break. The library does not prevent this.
AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux. Now maintained by Paul
Slootman <paul@isdn4linux.de>.
ISDN 4 Linux 3.13 2000/09/15 isdnformat(5)