How to delete duplicate text from a file?Search & replace back slashes to forward slashes in windowsSed...
A Missing Symbol for This Logo
How to delete duplicate text from a file?
What makes papers publishable in top-tier journals?
Website seeing my Facebook data?
How is it possible that the folder is there yet isnt in the same time?
Stuck on a Geometry Puzzle
Eww, those bytes are gross
Non-Cancer terminal illness that can affect young (age 10-13) girls?
Why is the size of a directory either 0 or 4096?
In harmony: key or the flow?
Is there a way to not have to poll the UART of an AVR?
How can I play a serial killer in a party of good PCs?
"Starve to death" Vs. "Starve to the point of death"
Possible issue with my W4 and tax return
Why zero tolerance on nudity in space?
Why maximum length of IP, TCP, UDP packet is not suit?
After checking in online, how do I know whether I need to go show my passport at airport check-in?
Why do all the books in Game of Thrones library have their covers facing the back of the shelf?
Existence of Riemann surface, holomorphic maps
What game did these black and yellow dice come from?
Can we "borrow" our answers to populate our own websites?
Confusion over units in force equation?
Difference in casting float to int, 32-bit C
Does it take energy to move something in a circle?
How to delete duplicate text from a file?
Search & replace back slashes to forward slashes in windowsSed error “sed: -e expression #1, char [#]: extra characters after command”replace long text with special characters with sedsed quotes and backslashes on cygwinHow to delete a line from a file that requires permission such as visudo using sed?How to replace line in file with pattern with sed?GnuWin32 sed how can I search and replace quotes? Win7 UKHow to add the filepath to a specified line of a file using bash script?Quotes in sed when used in bash scriptSed : unknown option to `s'
I tried to delete the tect with the following command
sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml
But its showing me error
sed: -e expression #1, char 69: unknown option to `s'
Can someone guide what is the issue?
linux sed
New contributor
add a comment |
I tried to delete the tect with the following command
sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml
But its showing me error
sed: -e expression #1, char 69: unknown option to `s'
Can someone guide what is the issue?
linux sed
New contributor
add a comment |
I tried to delete the tect with the following command
sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml
But its showing me error
sed: -e expression #1, char 69: unknown option to `s'
Can someone guide what is the issue?
linux sed
New contributor
I tried to delete the tect with the following command
sed -i -e 's/<check-valid-connection-sql>select 1</check-valid-connection-sql>//g' standalone.xml
But its showing me error
sed: -e expression #1, char 69: unknown option to `s'
Can someone guide what is the issue?
linux sed
linux sed
New contributor
New contributor
New contributor
asked 4 hours ago
subodhsubodh
1134
1134
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The first character after s
is used as a separator. You chose /
, so the correct command would be:
s/search/replace/flags
The problem is you have extra /
in your search
part:
<check-valid-connection-sql>select 1</check-valid-connection-sql>
^
So sed parses it like this:
Search: <check-valid-connection-sql>select 1<
Replace: check-valid-connection-sql>
Flags: /g
And /
is not a correct flag.
Use a different separator to fix this:
s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g
Worked Like Charm.Thanks
– subodh
2 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
subodh is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1409456%2fhow-to-delete-duplicate-text-from-a-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The first character after s
is used as a separator. You chose /
, so the correct command would be:
s/search/replace/flags
The problem is you have extra /
in your search
part:
<check-valid-connection-sql>select 1</check-valid-connection-sql>
^
So sed parses it like this:
Search: <check-valid-connection-sql>select 1<
Replace: check-valid-connection-sql>
Flags: /g
And /
is not a correct flag.
Use a different separator to fix this:
s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g
Worked Like Charm.Thanks
– subodh
2 hours ago
add a comment |
The first character after s
is used as a separator. You chose /
, so the correct command would be:
s/search/replace/flags
The problem is you have extra /
in your search
part:
<check-valid-connection-sql>select 1</check-valid-connection-sql>
^
So sed parses it like this:
Search: <check-valid-connection-sql>select 1<
Replace: check-valid-connection-sql>
Flags: /g
And /
is not a correct flag.
Use a different separator to fix this:
s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g
Worked Like Charm.Thanks
– subodh
2 hours ago
add a comment |
The first character after s
is used as a separator. You chose /
, so the correct command would be:
s/search/replace/flags
The problem is you have extra /
in your search
part:
<check-valid-connection-sql>select 1</check-valid-connection-sql>
^
So sed parses it like this:
Search: <check-valid-connection-sql>select 1<
Replace: check-valid-connection-sql>
Flags: /g
And /
is not a correct flag.
Use a different separator to fix this:
s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g
The first character after s
is used as a separator. You chose /
, so the correct command would be:
s/search/replace/flags
The problem is you have extra /
in your search
part:
<check-valid-connection-sql>select 1</check-valid-connection-sql>
^
So sed parses it like this:
Search: <check-valid-connection-sql>select 1<
Replace: check-valid-connection-sql>
Flags: /g
And /
is not a correct flag.
Use a different separator to fix this:
s#<check-valid-connection-sql>select 1</check-valid-connection-sql>##g
answered 3 hours ago
gronostajgronostaj
28.3k1471107
28.3k1471107
Worked Like Charm.Thanks
– subodh
2 hours ago
add a comment |
Worked Like Charm.Thanks
– subodh
2 hours ago
Worked Like Charm.Thanks
– subodh
2 hours ago
Worked Like Charm.Thanks
– subodh
2 hours ago
add a comment |
subodh is a new contributor. Be nice, and check out our Code of Conduct.
subodh is a new contributor. Be nice, and check out our Code of Conduct.
subodh is a new contributor. Be nice, and check out our Code of Conduct.
subodh is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1409456%2fhow-to-delete-duplicate-text-from-a-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown