
{"id":17784,"date":"2018-12-22T20:08:00","date_gmt":"2018-12-22T20:08:00","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=17784"},"modified":"2018-12-22T20:08:00","modified_gmt":"2018-12-22T20:08:00","slug":"about-bash-builtin-command-named-eval","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2018\/12\/22\/about-bash-builtin-command-named-eval\/","title":{"rendered":"About bash builtin command named &#8220;eval&#8221;"},"content":{"rendered":"<p><u>ABOUT eval<\/u><\/p>\n<pre>\neval is a builtin command of the Bash shell. It concatenates its arguments into a single string, joining the arguments with spaces, then executes that string as a bash command. It's similar to running bash -c \"string\", but eval executes the command in the current shell environment rather than creating a child shell process.\n<\/pre>\n<p><u>TYPICAL SHELL SESSION RELATED<\/u><br \/>\n[bash]<br \/>\n$eval ip address<br \/>\n1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000<br \/>\n    link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br \/>\n    inet 127.0.0.1\/8 scope host lo<br \/>\n       valid_lft forever preferred_lft forever<br \/>\n    inet6 ::1\/128 scope host<br \/>\n       valid_lft forever preferred_lft forever<br \/>\n2: eth0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000<br \/>\n    link\/ether 70:5a:0f:b9:d8:5c brd ff:ff:ff:ff:ff:ff<br \/>\n3: wlp2s0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc mq state UP group default qlen 1000<br \/>\n    link\/ether 68:14:01:07:36:1f brd ff:ff:ff:ff:ff:ff<br \/>\n    inet 192.168.1.5\/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp2s0<br \/>\n       valid_lft 253560sec preferred_lft 253560sec<br \/>\n    inet6 fe80::6324:f2f6:2c32:5ac8\/64 scope link noprefixroute<br \/>\n       valid_lft forever preferred_lft forever<br \/>\n$echo $?<br \/>\n0<br \/>\n$echo $eval<\/p>\n<p>$eval pw d<br \/>\nbash: pw: command not found<br \/>\n$eval <\/p>\n<p>[\/bash]<br \/>\nLINK<br \/>\n<a href=\"https:\/\/www.computerhope.com\/unix\/bash\/eval.htm\">https:\/\/www.computerhope.com\/unix\/bash\/eval.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT eval eval is a builtin command of the Bash shell. It concatenates its arguments into a single string, joining the arguments with spaces, then executes that string as a bash command. It&#8217;s similar to running bash -c &#8220;string&#8221;, but eval executes the command in the current shell environment rather than creating a child shell &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2018\/12\/22\/about-bash-builtin-command-named-eval\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;About bash builtin command named &#8220;eval&#8221;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,8,83],"tags":[556,736],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/17784"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=17784"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/17784\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=17784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=17784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=17784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}