Awk, grep from C program

This is a discussion on Awk, grep from C program within the C Programming forums, part of the General Programming Boards category; Can anyone tell me how I can invoke or call: awk, grep and sed commands from within a 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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,049
    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, 02: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-26-2003, 12:26 AM
  4. Grep
    By Adam in forum C Programming
    Replies: 0
    Last Post: 06-07-2002, 07:06 AM
  5. grep
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 02-26-2002, 12:11 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21