#Set max. character limit with echo
49 messages · Page 1 of 1 (latest)
what no
@harsh granite d Can you explain what the objective is?
ok, so basically: I have echo "$B - $A" and if $A is longer, than... let's say 35 characters, only use the 35 characters of that and end it with ...
${variable:0:35}
Is there a way to end it with ...?
Just use a branch
string="$A - $B"
if [[ ${#string} -gt 35 ]]; then
echo ${string:0:35}...
else
echo "$string"
fi
Or use sed
sed 's/\(^.\{35\}\).*/\1.../'
unreadable, but exactly what i was looking for. thanks!
Unreadable?
I recommend reading the bash man page from line 1207 onwards.
sudo sometimes French taunts you if you mistype your password.
What do you mean here?
"Sudo sometimes taunts you in French if you mistype your password?"
That's the next closest semantically correct sentence I see... @slate birch
No, it does French taunts you
Search "French taunt"
So what's with the "sudo" particle at the beginning?
I don't know if there is a sudo particle besides fermions, quarks, leptons, bosons, photons, protons, gravitons, glutons, neutrons and electrons.
Ignosce mihi comitatem diffluere, at dicam te provocatum cognite
Guy de Loimbard send his regards
Well, maybe you just didn't put in effort to writing your sentence there, so I won't bother.
Well, maybe you just didn't put in effort to reading my sentence there, so I won't bother.
Yes, it must have been a sentence with effort put into it, as it doesn't even capitalize the first letter.
comity of courtesy is congruent, consequently, cease
your conterfeit condemnation.
This yes, it's from the movie, which many don't know.
Though this, I don't understand the reference.
of course not, You are english-types
What a strange person.
You know that communication is not done like that.
Just like a person who knows of Linux very well, and is talking about bootloaders to a windows user, who doesn't.
i don't want to talk to you no more, i fart in your general direction. Now go away, or I shall taunt you a second time.
Literally you.
Except the girl part. And Linux substituted with some old movie refrences.
You are in the wrong thread.
ok, so basically: I have echo "$B - $A" and if $A is longer, than... let's say 35 characters, only use the 35 characters of that and end it with
This is the thread we are currently in, please go next door to the left.
Yes, yes.
This a privilege most sublime to converse with thee, my estimable friend.