Page 2 of 2 [ 22 posts ]  Go to page Previous  1, 2

Orwell
Veteran
Veteran

User avatar

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

27 Jun 2009, 12:36 pm

I'm pretty sure cat is in anything that's vaguely POSIX-compliant.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 52
Gender: Male
Posts: 5,223
Location: Alberta Canada

27 Jun 2009, 2:02 pm

Orwell wrote:
I'm pretty sure cat is in anything that's vaguely POSIX-compliant.


So a bag is POSIX compliant?


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 67
Gender: Male
Posts: 7,015

27 Jun 2009, 3:20 pm

is cat as in the 'display file contents' cat? heck, even Cygwin (an emulator of linux) has that..

Pakled...missing the point as usual...;)



lau
Veteran
Veteran

User avatar

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

27 Jun 2009, 6:40 pm

I suggested merely using the shell. "cat" is a command. The shell takes what you give it, messes it about, then expects to invoke the first word on the line, as a command that it should find somewhere on the path list of directories, and it passes it the rest of the line as parameters.

Except... some "commands" are just built directly into the shell. E.g. "echo". You will find an executable file at "/bin/echo", but that binary is seldom actually invoked, because most shells (bash, etc) field out those sort of commands as something that is better handled directly within the shell itself. They are "builtins". I've just checked, and "cat" is not a builtin in bash, whereas "echo" is.

Hence, in order to ONLY use the shell, I should have given:

Code:
echo -e >> /etc/X11/xorg.conf  \
\\n\
Section \"ServerFlags\"\\n\
Option \"DontZap\" \"off\"\\n\
EndSection


_________________
"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: 35
Gender: Male
Posts: 12,518
Location: Room 101

27 Jun 2009, 8:00 pm

Normally, if I want to view a file's contents, I just open it in a text editor.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


lau
Veteran
Veteran

User avatar

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

28 Jun 2009, 1:41 am

Normally, if I want to view a file's contents, I just use "less".

(Or sometimes "view", if I want some extra snazzy searching.)


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