Created
June 20, 2017 05:02
-
-
Save Wilker/0dbebd2e7c500fb4f56fbf5d201402f0 to your computer and use it in GitHub Desktop.
#Script para gerar a string das páginas de impressão em dois lados para um impressora que imprime em um lado só
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Script para gerar a string das páginas de impressão em dois lados | |
#para um impressora que imprime em um lado só | |
for i in $(seq 1 $(( $1 - 1 )) ); do | |
if [ $(($i % 2)) -eq 1 ] | |
then | |
echo "$i,\c" | |
fi | |
done | |
echo " " | |
for i in $(seq 1 `expr $1 - 0`); do | |
if [ $(($i % 2)) -eq 0 ] | |
then | |
echo "$i,\c" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment