echo

  • gr8linux
  • Born
  • Born
  • No Avatar
  • Joined: Jun 17, 2009
  • Posts: 4
  • Status: Offline

Post June 17th, 2009, 10:30 pm

can anyone please tell me what is the internal working of echo command....... i mean how does it display anything we entered.....
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 17th, 2009, 10:30 pm

  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 29, 2007
  • Posts: 456
  • Loc: India
  • Status: Offline

Post June 17th, 2009, 10:53 pm

Just about every programming language has some kind of text output function, such as printf in C. It's quite obvious that the echo command uses this to display the text you enter.
Fotografix: A portable image editor
  • gr8linux
  • Born
  • Born
  • No Avatar
  • Joined: Jun 17, 2009
  • Posts: 4
  • Status: Offline

Post June 17th, 2009, 11:03 pm

casablanca wrote:
Just about every programming language has some kind of text output function, such as printf in C. It's quite obvious that the echo command uses this to display the text you enter.


thanx for ur response.
i m not looking for what does echo do, i wanna know how does it display..... what is the roll of shell, kernal etc. in this .........
  • casablanca
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 29, 2007
  • Posts: 456
  • Loc: India
  • Status: Offline

Post June 17th, 2009, 11:14 pm

The shell basically reads user input and invokes some function based on the command. In case of "echo", it calls an output function such as printf, which in turn uses the kernel's services to print characters on the screen. The kernel itself uses device drivers (the display driver in this case) to communicate with the hardware.

Hope I answered your question.
Fotografix: A portable image editor

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: jubert and 97 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.