If you do want to specify different line patterns, you can do something like:
This will comment lines "PM3_fun" and "PM4_fun".
add more -e parts in the same way for other lines.
Also. PM3 and PM4 can be combined as PM[34], and in the same way for other patterns also.
But if you having only these lines, specifying explicitly won't be harder too.
Hello folks
Hope all are fine, I have query need suggestion, if these lines two lines are already commeted no need to do anything, one more thing order of alpha, gama may be different.
I have a two lines in a file data.txt
%checksum
alpha gama beta penta hexa
I want to do... (8 Replies)
I want to remove the commented lines in a file identified by ' symbol at the start of each ine. A sample example will be like:
Input
-----
'IFerr_flag=0THEN
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
iferr_flag=0then
Output
-------... (3 Replies)
Hi all,
is it possible to add a comment starting with "#" (with vi for example) to the static route file in:
/etc/sysconfig/network-scripts/route*
Are you aware of any problems this can cause after a network restart?
Thanks,
Evan (1 Reply)
I have 2 files: fileA and fileB.
content of fileA
---------------
admin.teacher is in new york;
admin.mason is in new york;
admin.driver is in new york city;
user.trucker is in hartford;
admin.developer is in new york state;
content of fileB
----------------
admin.teacher is in... (2 Replies)
Hello,
Be indulgent for my english.
Can you help me ?
function f1 {
}
egrep -v '^#' list_file \
| while read arg1 arg2 arg3 arg4; do
f1 $arg1 $arg2 $arg3 $arg4
done
In list_file there is
I want to replace list_file by a $var
then when i launch the script with a file's... (13 Replies)
Legends,
Can you please help me in following.
I need to comment lines from “/tmp/a.txt” from the line A to line B through the command prompt only.
Please use variables not direct values like 2 or 5
It can be done with VI editor but it's not matches with my requirement (: 2,5 s/^/#/g).
... (1 Reply)
Platform : RHEL 5.4
I have several .sql files in a directory. I want to comment lines 10 to 25 for all .sql files.
How can I do this ?
The symbol for comment in SQL is --
eg:
-- select salary from emp where empname = 'URS' ; (3 Replies)
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,
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)
Dear Gurus,
I have a file which comes every day with set of data, as a part of processing i want to add a comment at the start of every line.
e.g of file
<PCL>
2E;"HCA";"COP Car A";"ODBS_CFG"
7C;"DD";"Doors Car D";"ODBS_CFG"
3D;"XA";"Auxiliary Car A";"ODBS_CFG"
3E;"XB";"Auxiliary... (12 Replies)