lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

Is there such a device on the PI?

Fri Sep 02, 2016 11:46 pm

A long time ago, on another machine:

If you wanted to do a command quietly, or weren't interested in output from a command, you would put

> NIL:
or
> NUL: at the end of the line.

This would send the results to either NIL or NUL.

What is the equivalent on the PI?

As I don't know what they are called, it is difficult to search for them in the forums.

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Is there such a device on the PI?

Sat Sep 03, 2016 12:15 am

To avoid seeing the normal output you might try

Code: Select all

> /dev/null
or if you don't want to see any error messages either, you can redirect both stdout and stderr streams with

Code: Select all

> /dev/null 2>&1 
See also: http://askubuntu.com/questions/12098/wh ... sh-scripts

lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

Re: Is there such a device on the PI?

Sat Sep 03, 2016 12:31 am

Thanks very much.

jahboater
Posts: 5680
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Is there such a device on the PI?

Sat Sep 03, 2016 4:34 pm

Or

Code: Select all

&> /dev/null
(alternative for the very common >xxx 2>&1)

User avatar
scruss
Posts: 3155
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Is there such a device on the PI?

Sat Sep 03, 2016 5:17 pm

lerner, it might save you (and forum members) a bunch of time and questions if you read The Linux Command Line by William E. Shotts, Jr.. It's free online, or available as a regular book from No Starch Press.

Yeah, AmigaDOS was a bit like Unix. Not quite, though; it didn't have Unix's flat filesystem and device tree, but had separate devices like S: (≅ /etc), ENV: (where environment variables lived as files) and DH0. AmigaDOS also pretty much ignored case of file names; Linux doesn't.

If you want to run a command really quietly in the background and disconnect all IO from the current shell so you can exit it and keep the command running, you could do:

Code: Select all

nohup command 2>&1 > /dev/null &
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

Re: Is there such a device on the PI?

Sat Sep 03, 2016 8:35 pm

Scruss,

Wow! Top marks for getting it was Amiga's Workbench. Not many people would remember that.

I was pretty good with that, but mine kinda died back in the late 90's. :(

Thanks too for the link. Shall get and read it.

I have a UNIX book somewhere, but with all the other books, it becomes "one of many" which I am reading.
And it is a bit dated: Like 1980's dated.

User avatar
scruss
Posts: 3155
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Is there such a device on the PI?

Sat Sep 03, 2016 9:17 pm

lerner wrote:Wow! Top marks for getting it was Amiga's Workbench. Not many people would remember that.
Was a dedicated ARexx and Wshell user back in the day. Used to write for a bunch of Amiga magazines, too.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

Re: Is there such a device on the PI?

Sat Sep 03, 2016 9:30 pm

Yeah, memories..... :)

I was really starting to get the jist of AREXX and scripts on the Amiga, and it died.
I am sure had it been working, I would be a lot better with my programming skills, but alas it s not, so I shall try to not dwell too much on the "ifs" and try to concentrate on the here and now.

But, hey, its good to meet another Amiga follower.

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Is there such a device on the PI?

Sun Sep 04, 2016 9:08 am

lerner wrote:Yeah, memories..... :)
But, hey, its good to meet another Amiga follower.
You can add me to that list.

And my 1200 is still working :p
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

Return to “Beginners”