Mo

1 개요[ | ]

Mo - Mustache Templates in Bash

2 설치[ | ]

Bash
Copy
curl -sSL https://git.io/get-mo -o mo
chmod +x mo
sudo mv mo /usr/local/bin/
echo "works" | mo
Console
Copy
testuser@localhost:~$ curl -sSL https://git.io/get-mo -o mo
testuser@localhost:~$ chmod +x mo
testuser@localhost:~$ sudo mv mo /usr/local/bin/
testuser@localhost:~$ echo "works" | mo
works

3 테스트[ | ]

Bash
Copy
cat <<EOF > fun-trip.mustache
Hello, {{NAME}}.

I hope your {{TIME_PERIOD}} was fun.
EOF
NAME=Tyler TIME_PERIOD=weekend mo fun-trip.mustache
Console
Copy
testuser@localhost:~$ cat <<EOF > fun-trip.mustache
> Hello, {{NAME}}.
>
> I hope your {{TIME_PERIOD}} was fun.
> EOF
testuser@localhost:~$ NAME=Tyler TIME_PERIOD=weekend mo fun-trip.mustache
Hello, Tyler.

I hope your weekend was fun.

4 같이 보기[ | ]

5 참고[ | ]