De acordo com as Leis 12.965/2014 e 13.709/2018, que regulam o uso da Internet e o tratamento de dados pessoais no Brasil, ao me inscrever na newsletter do portal DICAS-L, autorizo o envio de notificações por e-mail ou outros meios e declaro estar ciente e concordar com seus Termos de Uso e Política de Privacidade.

Caracteres invisíveis

Colaboração: Rubens Queiroz de Almeida

Data de Publicação: 27 de Junho de 1997

Tomemos a seguinte seqüência de comandos:

  % touch a a
  % ls
  a  a

Temos no diretório, aparentemente, dois arquivos com o mesmo nome. O carácter <CTRL>-X não aparece na listagem, está invisível Mas como isto é possível? Neste caso é evidente que os dois arquivos não possuem o mesmo nome; um deles chama-se "a" e o outro chama-se <CTRL>-Xa. Mas como fazer para identificar o problema? O comando cat pode ser usado para isto:

  % ls | cat -v
  ^Xa
  a

A opção -v faz com que o comando cat exiba também os caracteres invisíveis. Outra dica, às vezes a listagem de um diretório pode parecer um pouco estranha, como em:

  % ls
        a  a

Porque a listagem não começa na primeira coluna? Vejamos porque:

  % ls | cat -v
  ^A
  ^X
  ^Xa
  a

Existem dois arquivos "invisíveis", ou seja, os seus nomes são compostos de caracteres não exibíveis (existe esta palavra?), no caso ^A e ^Xa. Da mesma forma que o comando "cat -v" foi utilizado neste caso, para listar diretórios, ele pode ser usado para listar aqueles arquivos onde tudo supostamente deveria estar funcionando mas não está. Neste caso o culpado pode ser um destes caracteres invisíveis em um local onde não deveria estar.


Dica Humorística :-)

Fit the Twenty-fourth: Last Bastard Operator, vignette #2

BOFH © 1990-1995 by Simon Travaglia and Datamation. All rights reserved. Bastard Operator From Updated: Tuesday 14 November 1995

It's a stinking hot day in my non-air conditioned office and I'm annoyed. The sort of annoyed that's described, mistakenly, as red hot. The correct colour choice, is, of course white.

I login to my account and there's three helpdesk mail requests, all ticking away to expiration, then escalation, then further escalation, then followup mail message, then even further escalation, then 2nd followup mail message and casual phone call, then still further escalation, then non-casual phone call, then threats, then, ultimately, and sadly, violence. But not so sadly that I won't resort to it. And they know I will too...

Because I used to be...

T H E B A S T A R D O P E R A T O R F R O M H E L L ! ! !

...and sometimes, late at night I get these twitches. Like dead people get. (Or, as I prefer to call them, perfect computer users)

In the mornings I get them too. Like when the phone rings. And when I get email. And when people talk to me. AND when people are hogging the expresso machine to make fluffy milk. But apart from that I'm cured. A new man.

I smile at the thought and look, in reminiscence, at some reminders of my past. A couple of backup 8mm tapes with cartoons on them. The thank-you cards for my attendance at 23 seperate funerals of computer center staff. The mains plug with the thinwire ethernet plug at the end. I didn't ever get round to trying that one either, so I don't even know what it would've done.

I'm bored.

That's it alright. I am *absolutely*, *stinking*, *UNCONTROLLABLY* bored. I get up and slip a fingerprint free magnet on top of the reed switch that the Boss had installed in my display cabinet while I was on holiday, then pry the glass door open with a screwdriver. As far as I can figure, the switch is supposed to ring an alarm if the door is opened.

If I've said it once, I've said it a thousand times - "Inexpensive means Inefficient".

I open the door to the clamour of... silence. Well, silence and John Lee Hooker's "Mr Lucky" from my CD. I grab my aforementioned etherkiller and wander down the hallway to the switchboard, applying another magnet and opening that to silence as well.

That's what's missing in society today - trust.

I pull the 15 amp breaker for the meeting room, then wander on round and plug the etherkiller into a cheap 24hour timer set to 5 minutes from now. On the way back to the the switchboard I hear the first few murmurs about excessive collisions. I plug in my unpatented nail "fuse" (estimated fault current 200-300 amps) with a set of heavily insulated pliers and wander off to the tea-room to start my expresso brew. Halfway through the make, the machine stops. Now *THAT'S* what I call a collision.

I look around in a bewildered manner as panic erupts on all sides, half-made expresso in my hand. I step out into the hallway and behold pandemonium. Two programmers are fighting over a CO2 fire extinguisher in an effort to put their terminals out. I wander down to my room just as my X terminal, the unreliable peice of excretia it is, flames it's last and lapses into a dull smoulder.

"My cabinet!" I cry in 'horror' and hear the extinguisher struggle end abruptly. In a flash the two programmers concerned are behind me staring into my room. Shortly thereafter the boss runs up as well.

"What's this magnet for?" I ask, picking it up and hearing a bell start chiming in the distance.

"You bastard!" one of the programmers utters

"I'm sorry?" I ask, turning.

"YOU did it didn't you?"

"What? Break into my own cabinet? But I've got a key.."

That's the terrible burden of proof really - in this day and age, you need some to make an accusation.

The late-breaking news comes in that one of the consultants had a set of head- phones plugged into a CDROM drive hanging off their networked PC. But not anymore. Now there's an unexpected vacany in the department. I blame the Ethernet Isolation specs. 3KV my backside!

Quicker than you can say "Help us with our enquiries" I'm "helping the police with their enquiries".

"What is this, can you tell me?" a burly officer asks, right up in my face. He holds up a magnet.

"It's a magnet. There was one on my cabinet!" I cry

"Yes. And where did you get them?" he asks, seizing control..

..and losing it. "On my cabinet! I just said!"

"No not this one. The others. Where did you get them?"

"Others? What others? You mean there were more on my cabinet! Why?!?" (I can play the "stupid game" forever, having had years of education at the hands of computer lusers.) He tries a different tack.

"What would you say this was off?" he asks

"My cabinet! It was on my cabinet, I told you! I pulled it off... and I think I heard a bell ringing"...

.... .. .

A couple of hours later I'm back at my desk with Mr Lucky, no charges pressed. I close my cabinet, satisfaction mine for the first time in a long while.

Then the phone rings...

Adicionar comentário

* Campos obrigatórios
5000
Powered by Commentics

Comentários

Nenhum comentário ainda. Seja o primeiro!


Veja a relação completa dos artigos de Rubens Queiroz de Almeida