Search:

Type: Posts; User: lan_zer0

Search: Search took 0.00 seconds.

  1. Replies
    12
    Views
    8,982

    Aaahhh ok I get it now. The reason the above...

    Aaahhh ok I get it now. The reason the above code works is because I had to set a up an alias for my program that piped the alias output to the program (just like which), then grep for the...
  2. Replies
    12
    Views
    8,982

    The code seems to work though. I took out...

    The code seems to work though. I took out STDIN_FILENO, and it seems to work ok. It hangs when i run it directly, but runs fine with a test suite.
  3. Replies
    12
    Views
    8,982

    Thanks, I'll try that. I apologize, I should...

    Thanks, I'll try that.

    I apologize, I should have explained the code a bit better. Command is the command I want to print the alias out for. So the code is the core of my printAlias function,...
  4. Replies
    12
    Views
    8,982

    Would you be able to explain the grep command...

    Would you be able to explain the grep command above? I still don't understand how it is able to grab the alias and print it out. It looks like its doing something like grep -e [command]=, and...
  5. Replies
    12
    Views
    8,982

    Thanks for the replies. What I am trying to do...

    Thanks for the replies. What I am trying to do is implement a limited 'which' command, one of the options being to display the alias of the input command. So the basic use of my which program would...
  6. Replies
    12
    Views
    8,982

    Executing 'alias' Linux shell command from C

    Hi, I was wondering how to execute Linux shell commands, like 'alias,' from a C program. I understand how to fork and use execl with commands like 'ls' and 'grep', but I cannot find the proper path...
Results 1 to 6 of 6