While I was working a bit on pick, my select emulator, I started to get an endless loop...
I could point it down to my 'arrow-keys catch code':
However, while running the code - with regular (expected numeric input)... it becomes this:
Which definitly is NOT what I had expected as behaviour.
Any ideas why I get this 'false positive'?
Thank you in advance
EDIT:
It is even worse / more weird...
Now, I did comment out the the ^[[-code part, just so it fails at the [a-zA-Z] already....
Still fails.
It passes [a-zA-Z] (double & single quotes) just to fail at the '^\[\[' line AFTERwards....
But either way, the "++debug output showed single quotes in the first post, despite not having them.
AHHHHHHHHHHHHHHHHH SCREW IT....
Closed terminal... started a new one and now....
No colors/borders anymore... FFFFFF=white of anger....
Bet the issue was somewhere there (in the env-memory of said now-closed terminal window-tab).....
All my (obviously imagined) fixes.. worthless... once more... again....
I'm back to square one... to fix the display-functions that i THOUGHT were working yesterday evening.. 24 hrs ago... WTF?!?!
No more coding today...
I do remember you being quite concerned with performance in this SWARM stuff and I would have thought the bash =~ operator could be use in place of grep.
Twice as fast on my system, but your mileage may vary
This User Gave Thanks to Chubler_XL For This Post:
Yes, I'm always getting confused whether to use /dev/null or /dev/zero, because most of the *nix flavors I use, have both.
Yes, this might be unususal, but it helps to avoid parsing errors -> well the visual breakup <- when 'catching' arrow keys (NOT specificly).
Are you refering to the other '^[[' line just above - which is commented out, or to the '[a-zA-Z]' grep to be changed to ~=?
But basicly, neither of those lines are 'now' executed, because it's 'all' left out anyway - to my understanding - the only reason it's still there, is because I just had it rewritten it compared to the initial post (before sleeping).
Or am I missing a point of yours?
Thank you.
Hi
I have written a script to send email alerts when load of my linux server reaches max point
I keep getting false emails thought the load is normal , looks like same email is generated again and again - called from cron tab
checked if the tempfile is present , no it is not , cleaned... (22 Replies)
I have read the below from the book bash cookbook.Tail +1 filenames is similar to cat filename
I have tried the same in Ubuntu 11.10 with bash. 4.0 .
I have received error for the Same.
May I know in which system that will work fine ?
Thanks (1 Reply)
Checking configuration access files for an AIX server, left me wondering about this :confused::
If a user is added to system group, it gets gid=0 with some security risks because it gets some root kind of file access level.
Is this insecure condition kept if the user has admin variable... (0 Replies)
Why this happens?
How to solve this?
$netstat -na |grep 9325
tcp 0 0 127.0.0.1:9325 127.0.0.1:9325 ESTABLISHED
When a client socket repeatedly tries to connect to an inactive(no server socket is listening on this port) local port,connect succeeds.
... (1 Reply)
Hi All,
I am using the below Script to enter a line in the File:
#!/bin/ksh
# To delete the last line if it contains the pattern Redirect permanent / Virgin Atlantic Airways - Popup
echo "Enter the URL that should point to the particular microsite"
read url
# To delete the last line if it... (0 Replies)
Hi,
I'm new to UNIX and am trying to learn shell scripting in order to work on an interface that I inherited when a co-worker left. I need to be able to check to see whether a file exists to determine whether the FTP has taken place, but in testing, the if statement always evaluates as false,... (3 Replies)
i want to delete every newline and every line which starts with "RECORD......." in a file.
FILE:
Record 61391 in base BROCKHAUS (Timestamp: 2008-04-09 11:38:38)
UNTERTITEL :
Gräfin (seit 1707 Reichsgräfin) von, * Schwerin 4. 2. 1686, + Berlin
21. 10. 1744; wurde
Record 61392 in base BROCKHAUS... (4 Replies)
We have requirments to not allow a userid login abilities but allow users to 'su' to it. In solaris I normally set the shell in /etc/passwd to bin/false. THis does not work on Linux, any suggestions would help. (1 Reply)