Search This Blog


printf "%.2s" "hi mom" # duh!

man sh... i c dumb ppl:
... i logged in with my google account to help you... but...
"Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site."
"You must have 50 reputation to comment"
aka: hoops!... you're the ones who are loosing!... i would help, but you don't let me :P
ahahah: shell shock"
as pessoas normais usam:
 short="`printf "%.2s" "$long"`"

... ou assim:
 short="${long#?}"; short="${long%"$short"}"

ROFL: mas todas as solucoes de merda puderam entrar...
 short=$(echo ${long} | cut -c1-2)
 short=$(echo ${long} | head -c2)
 short=$(echo ${long} | awk '{print substr ($0, 0, 2)}'
 short=$(echo ${long} | sed 's/^\(..\).*/\1/')

... anda tudo com um grave problema existencial...

"Anybody can comment on their own posts and on answers to their own questions. The restriction is only in place for commenting on other people's questions." (aka: there it is!)
^^^ uau: vai de mal a pior...