Added shtpl utility
This commit is contained in:
parent
fabb36eaa1
commit
7604d2bd7b
|
@ -0,0 +1,10 @@
|
|||
#!/home/dig/bin/shtpl
|
||||
|
||||
Coucou $WHO !
|
||||
|
||||
$(
|
||||
for ((i=0 ; $nbrBoucle - $i ; i++))
|
||||
do
|
||||
echo "$i+100"
|
||||
done
|
||||
)
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
eval "echo \"$(cat $1 | sed '
|
||||
1{ /#\!.*shtpl/ d }
|
||||
s/"/\\"/g
|
||||
')\""
|
||||
|
||||
|
||||
#eval "echo \"$(perl -p -e 's/"/\\"/g' $1)\""
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# With env variables
|
||||
|
||||
## On single line
|
||||
WHO=Doctor nbrBoucle=5 ./boucle.shtpl
|
||||
|
||||
## Multiline
|
||||
WHO=Doctor \
|
||||
nbrBoucle=5 \
|
||||
./boucle.shtpl
|
||||
|
||||
# Save result to file
|
||||
|
||||
WHO=Doctor ./boucle.shtpl > final.txt
|
Loading…
Reference in New Issue