Thread: Awk, grep from C program

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    8

    Awk, grep from C program

    Can anyone tell me how I can invoke or call: awk, grep and sed commands from within a C program?
    ..Thanks

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    system() or popen() would be good things to read about in the respective manual pages.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Also lookup the man page of the exec() family of functions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with grep
    By NuNn in forum C Programming
    Replies: 1
    Last Post: 04-13-2009, 01:51 PM
  2. writing a grep program
    By cnovice in forum C Programming
    Replies: 8
    Last Post: 11-22-2005, 08:05 AM
  3. grep
    By misswaleleia in forum C Programming
    Replies: 2
    Last Post: 05-25-2003, 11:26 PM
  4. Grep
    By Adam in forum C Programming
    Replies: 0
    Last Post: 06-07-2002, 06:06 AM
  5. grep
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 02-26-2002, 12:11 PM

Tags for this Thread