aboutsummaryrefslogtreecommitdiff
path: root/_example/localhost
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-12-09 11:28:42 +0700
committerShulhan <ms@kilabit.info>2021-12-09 11:29:02 +0700
commitfa94025f8e59206c1118e8c404cbff0412af4152 (patch)
tree4e2cb7c4400993acf1c3722087c72dede82fdb15 /_example/localhost
parent2444749ff5ae11e02b18b10891d78cbec0ef7002 (diff)
downloadawwan-fa94025f8e59206c1118e8c404cbff0412af4152.tar.xz
all: make the local statement executed with "/bin/sh -c ..."
By using "sh -c", the statement can contains environment variable, piping, and other shell commands that cannot be supported if executed directly using native os.Exec.
Diffstat (limited to '_example/localhost')
-rw-r--r--_example/localhost/test.aww10
1 files changed, 8 insertions, 2 deletions
diff --git a/_example/localhost/test.aww b/_example/localhost/test.aww
index e003d48..6773668 100644
--- a/_example/localhost/test.aww
+++ b/_example/localhost/test.aww
@@ -1,2 +1,8 @@
-sh -c "echo a"
-sh -c "echo b"
+echo a
+sh -c "echo 'a\b'" # a\b
+sh -c "echo 'a'\'''" # a'
+
+ls -al ~/ | grep .ssh
+echo "test" > /tmp/awwan.test
+cat /tmp/awwan.test
+# test