You feel excited to learn computer languages

Then you are at the right place. Computer languages are most fun thing you have ever seen. Use this excellent languages and have a nice future...

How computer can help you?

I will ask how it can not? From the latest trend of social networking sites like Facebook, Twitter to the extended use of computer in our house hold devices. You can be benefited from computer in the every aspect of life.

What web technology?

It is the blessings of web technology, that brings you here and you are reading my post now. Strange huh!! Not at all. Use my web technology tutorials and understand, how they can help you for better marketing and advertising systems.

How Mobile technology can help us?

You have answer right? I know. But in my tutorials I will cover some unique features that may add some information in your hard disk too. Sounds good? Check them...

Computer and future

Yes that is the most important question to me. What is next? What is going to be the next big thing for us? Well I will answer them in my blog. Check the corresponding section..

Showing posts with label shell programming. Show all posts
Showing posts with label shell programming. Show all posts

Thursday, November 10, 2011

Your own Command.Com shell using C Language

Your own Command.Com shell using C Language
I made this customized COMMAND.COM file. You can add more commands. If you want updated version.  Comment here. I will post the updated version.

#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<process.h>
 char str[20];
 void play(char []);
 void process(char []);
 void quit();
 void help();
 void clear();
 void dir();

 struct lost
 {
char text[20];
void (*f)();
 }los[]={"EXIT",quit,
"HELP",help,
"CLEAR",clear,
"DIR",dir};
 void main()
 {
while(1)
{
printf("\nCommand¯¯");
scanf("%s",str);
process(str);
play(str);
}
 }
 void play(char ar[])
 {
int c=0;
while(c<2)
{
if(strcmp(los[c].text,ar)==0)
{
los[c].f();
}
c++;
}
 }
 void process(char ar[])
 {
int c=0;
while(ar[c]!=NULL)
{
ar[c]=toupper(ar[c]);
c+=1;
}
 }
 void quit()
 {
exit(0);
 }
 void help()
 {
printf("Created by Debarghya Mukherjee.......\nDated 20.11.04\nEmail-debarghya_mkr@yahoo.com");
 };
 void clear()
 {
clrscr();
 }
 void dir()
 {
 }