ref: 9c91eb7d6fc918527c0518d6134c948414196833
dir: /changeblog/1594885496.ht/
<article> <header> <h2>lib/profile quick hack</h2> <b>Thu, 16 Jul 2020 09:44:56 +0200</b> </header> <p style="margin-top: 0; margin-bottom: 0.50in"></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="line-height: 1.4em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: center;"> <span style="font-size: 12pt"><b>lib/profile quick hack</b></span></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="margin-top: 0; margin-bottom: 0.42in"></p> <p style="margin-top: 0; margin-bottom: 0.21in"></p> <p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="margin-top: 0; margin-bottom: 0.50in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">Some smaller change that can change your life. </span></p><p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">There are reasons why you not run </span><span style="font-size: 10pt"><i>rio</i></span><span style="font-size: 10pt"> in your lib/profile. For me the main reason would be: You can no longer use </span><span style="font-size: 10pt"><tt>rcpu -c commands</tt></span><span style="font-size: 10pt"> in your shell. Rio opens and there you are, stuck in front of a gray background. </span></p><p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">My solution: </span></p><p style="margin-top: 0; margin-bottom: 0.08in"></p> <p style="line-height: 1.1em; margin-left: 1.28in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 9pt"><tt>case cpu</tt></span></p> <p style="line-height: 1.1em; margin-left: 1.28in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 9pt"><tt> # … lots of stuff …</tt></span></p> <p style="line-height: 1.1em; margin-left: 1.28in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 9pt"><tt> rcpucmd=‘{cat /mnt/term/env/cmd >[2]/dev/null}</tt></span></p> <p style="line-height: 1.1em; margin-left: 1.28in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 9pt"><tt> if(~ $#rcpucmd 0)</tt></span></p> <p style="line-height: 1.1em; margin-left: 1.28in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 9pt"><tt> rio</tt></span></p> <p style="line-height: 1.1em; margin-left: 1.28in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 9pt"><tt> # … lots of stuff …</tt></span></p> <p style="margin-top: 0; margin-bottom: 0.17in"></p> <p style="margin-top: 0; margin-bottom: 0.08in"></p> <p style="margin-top: 0; margin-bottom: 0.05in"></p> <p style="line-height: 1.2em; margin-left: 1.00in; text-indent: 0.00in; margin-right: 1.00in; margin-top: 0; margin-bottom: 0; text-align: justify;"> <span style="font-size: 10pt">Now I can </span><span style="font-size: 10pt"><tt>rcpu</tt></span><span style="font-size: 10pt"> and have my rio, or </span><span style="font-size: 10pt"><tt>rcpu -c command</tt></span><span style="font-size: 10pt"> and run the command without leaving my shell. </span></p><p style="margin-top: 0; margin-bottom: 0.50in"></p> </article>