Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/hopper
|
||||
|
||||
#include <hopper.h>
|
||||
|
||||
main:
|
||||
|
||||
/* execute "ls -lstar" with no result return (only displayed) */
|
||||
{"ls -lstar"},execv
|
||||
|
||||
/* this form does not allow composition of the line with variables.
|
||||
Save result in the variable "s", and then display it */
|
||||
s=`ls -l | awk '{if($2=="2")print $0;}'`
|
||||
{"\n",s,"\n"}print
|
||||
|
||||
data="2"
|
||||
{""}tok sep
|
||||
|
||||
// the same as above, only I can compose the line:
|
||||
{"ls -l | awk '{if($2==\"",data,"\")print $0;}'"}join(s),{s}exec,print
|
||||
{"\n\n"}print
|
||||
|
||||
// this does the same as above, with an "execute" macro inside a "let" macro:
|
||||
t=0,let (t := execute( {"ls -l | awk '{if($2==\""},{data},{"\")print $0;}'"} ))
|
||||
{t,"\n"}print
|
||||
|
||||
{0}return
|
||||
Loading…
Add table
Add a link
Reference in a new issue