Skip to content

Instantly share code, notes, and snippets.

@coybit
coybit / magpi.sh
Last active March 17, 2022 06:28 — forked from omarowns/magpi.sh
Bash script to download all issues of The MagPi.
#!/bin/bash
#
# Creates a directory named "magpi" on your home folder and all issues are downloaded there.
# It also checks if you already have some of the issues and skips them from downloading.
# Use argument: --log OFF to disable logging. It is there because I have this script on my crontab and I needed to monitor if it running properly. For enabling logging do:
# $ sudo touch /var/log/magpi.log
# $ sudo chmod 666 /var/log/magpi.log
# That's it.
#
# Command execution is:
#define $(...) ((NSString *)[[NSArray arrayWithObjects:__VA_ARGS__, nil] componentsJoinedByString:@""])
/*
* Example
*/
NSString *string = $(@"Hello", @" ", @"World!", @"\n", @"1 + 2 = ", @(1+2));