Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # echo $2
- linea_giorni=$(cal $2 $3 | sed -n '2p')
- indice=$(cal $2 $3 | grep -w $1 | awk -v giorno=$1 '{
- indice = giorno - $1 + 1
- printf("%d", indice)
- }')
- posizione=$(( $indice * 2 + $indice - 3)) # Rivedere ma comunque giusto
- echo $posizione
- echo ${linea_giorni:$posizione:2} # In questo comando la prima lettera ha indice 0
Advertisement
Add Comment
Please, Sign In to add comment