What initiates the backup script in the window it runs in on Windows under cygwin?
In windows, I perform, Send to > Desktop (create shortcut) on the script file, which lives in /cygwin/usr/local/bin. I then modify the properties of the shortcut to,
When I want to run the backup, I double-click on the desktop shortcut. I also have an entry for the shortcut in Task Scheduler so that it runs every night. I could schedule with cygwin cron, but the windows scheduler is already running anyway and I didn't see the need to start a second daemon for just one task. This doesn't always work in windows 7 for some reason. The task appears in the schedule as active, but the script never runs. I have a second shortcut that runs a backup to an external device. For that script, I have to enter the drive letter of the external device after it is attached. Both scripts have an option to shutdown the computer after the backup is finished.
Quote:
Originally Posted by Don Cragun
What initiates the backup script in the window it runs in on macOS?
The process is similar in MacOS. I create an alias of the script in the script directory. For the alias file, I right click > open with > other. Then I select "All Applications" from the drop down menu (instead of the default "Recommended Applications", and then select "Terminal", "always open with", and then "open". This opens the script via the alias and runs it, which is annoying. I have to comment out most of the script first, or sit through the backup. There doesn't seem to be an easy way to indicate "open with" without actually opening.
Once this is done, I move the alias to the desktop and change the icon to something appropriate. I can then run the script by double clicking on the icon. MacOS doesn't seem to have any kind of launcher like most Linux distros. Launchers had vanished from Linux in some places as well, which is the type of thing I just can't understand. Why remove a useful functionality and force users to launch applications the way some programmer somewhere thinks they should be launched? What possible harm could it do to just leave it for those who want to use it?
Quote:
Originally Posted by Don Cragun
How was the window in which the backup script runs on Windows under cygwin created?
How was the window in which the backup script runs on macOS created?[/QUOTE]I'm not really sure about this. I presume that the OS opens the terminal and runs the script in the terminal. In windows, there are some window options in the shortcut properties. There is nothing like this in MacOS. Since MacOS is using an alias, my guess it that Finder opens the terminal window.
I got an email from a friend who uses MacOS much more often than I do and he said that I may be able to adjust the preferences for Terminal so that windows close when the terminal completes whatever process it it running. I will check on that and report back.
For a small script i want it so that the terminal closes when the script has completed its tasks.
To do so i use at the end if the script the following:
echo "Hello, World!"
echo "Knowledge is power."
echo ""
echo "shutting down terminal in 10 seconds"
exit 10
however the terminal stay's... (3 Replies)
Well. I was recently given access to my work's machine via SSH. I'm pretty sure it's a SUSE machine, uname -a gives
Linux machinename 2.6.16.60-0.54.5-bigsmp #1 SMP Fri Sep 4 01:28:03 UTC 2009 i686 i686 i386 GNU/Linux
I'm not doing anything all that exciting, mostly data entry stuff.
We... (14 Replies)
Is there a trick to closing a mac terminal with a command? I would think you could just type exit into your terminal but that doesn't work. I also tried quit and close just for the hell of it and that didn't work either. Does anyone know what the command is? (1 Reply)
Dear all,
We have a service that we start up remotely with rsh but unfortunately, the rsh never returns to the calling server. This seems to be because the processes of the service we've just started hold the port open.RBATTE1 @ /home/RBATTE1>netstat -na|grep 49.51
tcp4 0 0 ... (1 Reply)
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Heyas,
Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p
The last point for motivation was... (17 Replies)
Hello everyone!
I'm developing a MacOs Application in python and I'm having some issues trying to find information related to the power button pressed event. I know that in Ubuntu 14.04 you can find information about it on the acpi folders, but I realized that here in Mac that process is... (0 Replies)
Some hackers found a security hole in macOS High Sierra and tweeted it to the world before telling Apple about the problem. You can see the details from PC Magazine's daily news here: Apple Releases Fix for MacOS High Sierra 'Root' Bug. The original story this morning was published before a patch... (6 Replies)
Hello,
I have the following script that just archives and clears some log files.
#!/bin/bash
# script: archive_logs_and_clear
# add date to logfile names and copy archive directory
# clear logs
# change to script directory
cd ... (4 Replies)
Hello,
I have a backup script that runs an rsync backup to an external drive. I use the script frequently on Windows and Linux and have installed it on a Mac. The script has an option to run shutdown after the backup has completed. Since backup can take hours to run, this is an option that is... (10 Replies)