remove specific characters from a string Announcing the arrival of Valued Associate #679:...
By what mechanism was the 2017 UK General Election called?
How do I say "this must not happen"?
Table formatting with tabularx?
Is there night in Alpha Complex?
First paper to introduce the "principal-agent problem"
What is "Lambda" in Heston's original paper on stochastic volatility models?
How many time has Arya actually used Needle?
Understanding piped commands in GNU/Linux
Where and when has Thucydides been studied?
Why does BitLocker not use RSA?
What is a more techy Technical Writer job title that isn't cutesy or confusing?
Why is there so little support for joining EFTA in the British parliament?
Twin's vs. Twins'
What is the proper term for etching or digging of wall to hide conduit of cables
Flight departed from the gate 5 min before scheduled departure time. Refund options
Random body shuffle every night—can we still function?
.bashrc alias for a command with fixed second parameter
NIntegrate on a solution of a matrix ODE
Problem with display of presentation
3D Masyu - A Die
How to name indistinguishable henchmen in a screenplay?
Can I cut the hair of a conjured korred with a blade made of precious material to harvest that material from the korred?
Fit odd number of triplets in a measure?
Marquee sign letters
remove specific characters from a string
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Come Celebrate our 10 Year Anniversary!sed/awk: extract one number from stringHow do I use sed or awk to remove text?shell script + match MAJOR and CRITICAL strings from log fileremove non-printing characterssed + how to remove the last string after specific charactersed fix for BusyBox - boot fail unable to mount LVMNeed script to replace TEXT in selected filesReplace a string once another string has been foundsed + delete duplicate lines except the first one according to specific requesttext processing linux using grep awk or anything else
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have a scenario where I need to replace spaces with comma and then remove certain extra specific chars from a string.
echo "$d"
>>Mon Apr 22 05:06:00 UTC 2019
jent=$(echo $jt1 | sed 's/[[:space:]]/,/g')
echo "$jent"
>>Mon,Apr,22,05:06:00,UTC,2019 #this does the first job of replacing the space with comma
But again I want to remove the UTC part and the comma before it, how can I achieve it any help?
desired output should be
Mon,Apr,22,05:06:00,2019
scripting shell shell-scripting sed awk
add a comment |
I have a scenario where I need to replace spaces with comma and then remove certain extra specific chars from a string.
echo "$d"
>>Mon Apr 22 05:06:00 UTC 2019
jent=$(echo $jt1 | sed 's/[[:space:]]/,/g')
echo "$jent"
>>Mon,Apr,22,05:06:00,UTC,2019 #this does the first job of replacing the space with comma
But again I want to remove the UTC part and the comma before it, how can I achieve it any help?
desired output should be
Mon,Apr,22,05:06:00,2019
scripting shell shell-scripting sed awk
add a comment |
I have a scenario where I need to replace spaces with comma and then remove certain extra specific chars from a string.
echo "$d"
>>Mon Apr 22 05:06:00 UTC 2019
jent=$(echo $jt1 | sed 's/[[:space:]]/,/g')
echo "$jent"
>>Mon,Apr,22,05:06:00,UTC,2019 #this does the first job of replacing the space with comma
But again I want to remove the UTC part and the comma before it, how can I achieve it any help?
desired output should be
Mon,Apr,22,05:06:00,2019
scripting shell shell-scripting sed awk
I have a scenario where I need to replace spaces with comma and then remove certain extra specific chars from a string.
echo "$d"
>>Mon Apr 22 05:06:00 UTC 2019
jent=$(echo $jt1 | sed 's/[[:space:]]/,/g')
echo "$jent"
>>Mon,Apr,22,05:06:00,UTC,2019 #this does the first job of replacing the space with comma
But again I want to remove the UTC part and the comma before it, how can I achieve it any help?
desired output should be
Mon,Apr,22,05:06:00,2019
scripting shell shell-scripting sed awk
scripting shell shell-scripting sed awk
asked 5 mins ago
AlexAlex
705
705
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
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
});
}
});
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%2fserverfault.com%2fquestions%2f964018%2fremove-specific-characters-from-a-string%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f964018%2fremove-specific-characters-from-a-string%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