Page 1 of 1 [ 7 posts ] 

LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 37
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

25 Feb 2010, 2:07 pm

I'm beginning to think that maybe Apple didn't bother to include the full Unix shell in its operating system, maybe because they assume that most of their users are mundanes and not power users. I've tried writing man pages in nroff, but they don't render properly (strangely enough). Also, when I typed

echo "hi" | at 1206 Feb 25

It didn't do anything. It's a shame; that would have been one useful Unix command. I could program the computer to beep when it's, say, 10 minutes before I have to go to work.

User-friendly operating systems just aren't very geek-friendly sometimes. I wonder if Linux would have a better command line.



LittleTigger
Veteran
Veteran

User avatar

Joined: 5 Nov 2009
Age: 57
Gender: Male
Posts: 814

25 Feb 2010, 5:09 pm

Mac is more for video editing and sound editing,
I think either Linux or Unix would suit your
needs better.


_________________
A Boy And His Cat

When society stops expecting
too much from me, I will
stop disappointing them.


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

25 Feb 2010, 6:00 pm

LordoftheMonkeys wrote:
... Also, when I typed

echo "hi" | at 1206 Feb 25

It didn't do anything.

What did you expect it to do?

What command do you have called 'hi'?

Where did you expect the output to go?

Try:
Code:
echo "echo hi > at_log.txt" | at now +1minute
and you'll find it creating a file with the single line "hi" in it, on the next minute later.

PS. That's assuming that it was Linux. I don't know that Apple behaviour is identical.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 36
Gender: Male
Posts: 12,518
Location: Room 101

25 Feb 2010, 6:07 pm

LordoftheMonkeys wrote:
I'm beginning to think that maybe Apple didn't bother to include the full Unix shell in its operating system, maybe because they assume that most of their users are mundanes and not power users.

No, OS X has a fully POSIX-compliant shell. They are also certified UNIX compliant, and that certification is important enough to them that they've included all the usual UNIX utilities, whether or not many people take advantage of them.

Quote:
User-friendly operating systems just aren't very geek-friendly sometimes. I wonder if Linux would have a better command line.

OS X uses the Bash shell, which is also the default for most Linux distros. The main difference will probably be that the typical Linux distro will have command-line tools for package management that obviously don't exist on OS X, which has no package manager.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 37
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

25 Feb 2010, 6:48 pm

lau wrote:
Try:
Code:
echo "echo hi > at_log.txt" | at now +1minute
and you'll find it creating a file with the single line "hi" in it, on the next minute later.


Doesn't work.



StuartN
Veteran
Veteran

User avatar

Joined: 20 Jan 2010
Age: 62
Gender: Male
Posts: 1,569

26 Feb 2010, 11:35 am

This kind of task is best scheduled using cron, which also works on a Mac. The command crontab -e will edit your list of scheduled tasks. The following (on Linux) will use Zenity to display a pop-up and use mplayer to ring an alarm, at 4pm on every Thursday:

0 16 * * 4 DISPLAY=:0 zenity --warning --title "Alarm" --text "Thursday 4:00pm Lesson" & mplayer ~/alarm-clock-sound.mp3

You would need to find the Mac equivalents to pop up text and play a sound file.



Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 36
Gender: Male
Posts: 12,518
Location: Room 101

26 Feb 2010, 3:51 pm

StuartN wrote:
This kind of task is best scheduled using cron, which also works on a Mac. The command crontab -e will edit your list of scheduled tasks. The following (on Linux) will use Zenity to display a pop-up and use mplayer to ring an alarm, at 4pm on every Thursday:

0 16 * * 4 DISPLAY=:0 zenity --warning --title "Alarm" --text "Thursday 4:00pm Lesson" & mplayer ~/alarm-clock-sound.mp3

You would need to find the Mac equivalents to pop up text and play a sound file.

Or you could use "Automator" for an easier version. Or even easier, just create a recurring iCal event.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH