I tend to have a low attention span, so when I get a proof-of-concept like this up and running (and prove it works), even if the final results are not "polished", I then want to "call it good enough" and quickly move on to the next project.
This is me too except for the attention span. As soon as I find a solution to something I let others better it.
And as for doing something different I have done some bizarre stuff on here... <wink> /Me awaits the mickey take... ;oD
OT: Here is a small snippet for a terminal window you might like under OSX 10.14.6 on this MBP, solved and going into the Campimeter code.
Code:
#!/bin/bash
# Campimeter.sh
clear
# Set terminal to full screen and default sizes.
set_size()
{
osascript << "FULL_SCREEN"
tell application "Terminal" to activate
tell application "System Events" to keystroke "f" using { command down, control down }
delay 3
FULL_SCREEN
}
initialise()
{
clear
printf "%b" "\033[0;30;47m"
clear
SIZE=( $( stty size ) )
VERT_CENTRE=$(( ${SIZE[0]} / 2 ))
HORIZ_CENTRE=$(( ${SIZE[1]} / 2 ))
printf "%b" "\033[${VERT_CENTRE};${HORIZ_CENTRE}f\033[0;30;42m \033[0;30;47m\033[1;1f"
}
set_size
initialise
printf "\033[33;33f\033[1;31;47m*\033[0;30;47m\033[1;1f"
sleep 3
set_size
Enjoy...
Last edited by wisecracker; 01-30-2020 at 03:29 AM..
Reason: Corrected the "shebang", 30-01-2020. Thanks Ravinder...
These 2 Users Gave Thanks to wisecracker For This Post:
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Hi Wise,
I moved your code to another new topic as it was not directly related to the topic of networking, BLE, NB-IoT or ArduinoBlue where it was originally posted.
Hi Neo...
.................................
[code]#¡/bin/bash
.................................
Enjoy...
Thanks for sharing nice code wisecracker
Please forgive me if I am wrong here, I believe shebang should be #!/bin/bash right?
Or please correct me if I missed something here, cheers.
Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
Thanks for sharing nice code wisecracker
Please forgive me if I am wrong here, I believe shebang should be #!/bin/bash right?
Or please correct me if I missed something here, cheers.
Thanks,
R. Singh
Ha ha, thanks and corrected post #1...
Barry...
This User Gave Thanks to wisecracker For This Post:
Hi all...
This was the original code I created to expand a terminal on the fly using Python 2.6.x to the now 3.8.0 without modification under OSX 10.7.5.
I had no idea at the time that the MBP terminal could be full screen until here:... (0 Replies)
Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15)
Use zsh as the default shell on your Mac - Apple Support
Another interesting fact is that Catalina also comes with /bin/dash (5 Replies)
why,just beacuse that its the bottom layer uses a small amount of bsd code? In my opinion, macos and Unix are completely different. The directories are long directory structures. For example, /application, /system, /user, /volumes, etc. are completely different from the traditional /bin/ /sbin... (5 Replies)
Dear all,
I use awk quite a bit for data wrangling ... today I find weird behavior that I cannot wrap my head around.
if I execute the following command (simplified to illustrate the behavior ... nothing to do with the real command)
bash-3.2$ awk... (3 Replies)
1) How can I stop Vuze from reporting the following error: "Too many open files" ?
2) What directory do I need to be in to effectively utilize this command:
sudo bash -c 'ulimit -n 8192; sudo -u username ./azureus' ?
3) Is this the maximum number of files that I can allot to Vuze on OS X... (1 Reply)
I am interested in knowing if anyone out there has been using the BSD UNIX that underlies
MacOS X. Is this an "industrial strength" version of UNIX? Can I run X-Windows on such
a machine? How about TeXing, pythoning, PERLing or using other useful UNIX goodies
near and dear to my shrunken... (1 Reply)