Any way to interpret string representing an integer or operation? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionconverting numbers into full writen wordsFind files that have words in commonAchieving hexdump-like format, that includes binary strings, on the command line?Linux cgroups: limit CPU usage in absolute values which do not depend on CPU speedFind a “moderately large” divisor of a given number?Does 'multiport' make a difference in terms of efficiency?Run local script with local input file on remote hostsed? - Insert line after a string with special characters to Neutron serviceToo many shebang (script declaration) lines — any way to reduce their amount?Can we write a script to run some command within each interactive bash shell process?String to integer in Shell
Proof involving the spectral radius and Jordan Canonical form
Why one of virtual NICs called bond0?
What makes black pepper strong or mild?
Why are there no cargo aircraft with "flying wing" design?
How can I make names more distinctive without making them longer?
Why is "Captain Marvel" translated as male in Portugal?
Models of set theory where not every set can be linearly ordered
Is the Standard Deduction better than Itemized when both are the same amount?
Is there a "higher Segal conjecture"?
How can I fade player when goes inside or outside of the area?
Why does Python start at index -1 when indexing a list from the end?
What is the musical term for a note that continously plays through a melody?
Output the ŋarâþ crîþ alphabet song without using (m)any letters
Are my PIs rude or am I just being too sensitive?
What is this single-engine low-wing propeller plane?
Gastric acid as a weapon
Doubts about chords
"Seemed to had" is it correct?
Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?
G-Code for resetting to 100% speed
Check which numbers satisfy the condition [A*B*C = A! + B! + C!]
Do I really need recursive chmod to restrict access to a folder?
Letter Boxed validator
What's the purpose of writing one's academic bio in 3rd person?
Any way to interpret string representing an integer or operation?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionconverting numbers into full writen wordsFind files that have words in commonAchieving hexdump-like format, that includes binary strings, on the command line?Linux cgroups: limit CPU usage in absolute values which do not depend on CPU speedFind a “moderately large” divisor of a given number?Does 'multiport' make a difference in terms of efficiency?Run local script with local input file on remote hostsed? - Insert line after a string with special characters to Neutron serviceToo many shebang (script declaration) lines — any way to reduce their amount?Can we write a script to run some command within each interactive bash shell process?String to integer in Shell
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Lets say I have this string
one plus two
Is there any way we can interpret this as 1 + 2
faster than going into some conditions checking word per word and testing it if it equal something in a given list? Like
if [ `(word)` = "one" ]
elif [ `(word)` = "two" ]
etc..
linux shell-script arithmetic
add a comment |
Lets say I have this string
one plus two
Is there any way we can interpret this as 1 + 2
faster than going into some conditions checking word per word and testing it if it equal something in a given list? Like
if [ `(word)` = "one" ]
elif [ `(word)` = "two" ]
etc..
linux shell-script arithmetic
A broad challenge; unix.stackexchange.com/a/413475/117549 may help.
– Jeff Schaller♦
Apr 11 at 19:45
Also: metacpan.org/pod/Lingua::EN::Words2Nums , if Perl is an option.
– Jeff Schaller♦
Apr 11 at 19:55
add a comment |
Lets say I have this string
one plus two
Is there any way we can interpret this as 1 + 2
faster than going into some conditions checking word per word and testing it if it equal something in a given list? Like
if [ `(word)` = "one" ]
elif [ `(word)` = "two" ]
etc..
linux shell-script arithmetic
Lets say I have this string
one plus two
Is there any way we can interpret this as 1 + 2
faster than going into some conditions checking word per word and testing it if it equal something in a given list? Like
if [ `(word)` = "one" ]
elif [ `(word)` = "two" ]
etc..
linux shell-script arithmetic
linux shell-script arithmetic
edited Apr 11 at 19:50
Jeff Schaller♦
45k1164147
45k1164147
asked Apr 11 at 19:26
William ChrétienWilliam Chrétien
53
53
A broad challenge; unix.stackexchange.com/a/413475/117549 may help.
– Jeff Schaller♦
Apr 11 at 19:45
Also: metacpan.org/pod/Lingua::EN::Words2Nums , if Perl is an option.
– Jeff Schaller♦
Apr 11 at 19:55
add a comment |
A broad challenge; unix.stackexchange.com/a/413475/117549 may help.
– Jeff Schaller♦
Apr 11 at 19:45
Also: metacpan.org/pod/Lingua::EN::Words2Nums , if Perl is an option.
– Jeff Schaller♦
Apr 11 at 19:55
A broad challenge; unix.stackexchange.com/a/413475/117549 may help.
– Jeff Schaller♦
Apr 11 at 19:45
A broad challenge; unix.stackexchange.com/a/413475/117549 may help.
– Jeff Schaller♦
Apr 11 at 19:45
Also: metacpan.org/pod/Lingua::EN::Words2Nums , if Perl is an option.
– Jeff Schaller♦
Apr 11 at 19:55
Also: metacpan.org/pod/Lingua::EN::Words2Nums , if Perl is an option.
– Jeff Schaller♦
Apr 11 at 19:55
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f511977%2fany-way-to-interpret-string-representing-an-integer-or-operation%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 Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f511977%2fany-way-to-interpret-string-representing-an-integer-or-operation%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
A broad challenge; unix.stackexchange.com/a/413475/117549 may help.
– Jeff Schaller♦
Apr 11 at 19:45
Also: metacpan.org/pod/Lingua::EN::Words2Nums , if Perl is an option.
– Jeff Schaller♦
Apr 11 at 19:55