hi all
i have to write some script in c program
i tried this
and the file.txt isCode://cc simple.c -o simple #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char bb=system("cat file.txt | sed -n '/Underlying Value/,/]Top/p' | egrep -v 'Underlying Value|]Top' | sed 's/\[[0-9]\{1,\}\]//g' > /home/munna/Desktop/munna.txt"); printf("******** %s \n",bb); return 0; }
but this program saying some errors like[1]Home > [2]F&O >
Watch
All contracts of NIFTY
As on Hours IST
Instrument Type Underlying Expiry Date Option Type High
Price Low Prev Close of contracts traded
Turnover Lakhs Underlying Value
[5]AAAAA [6]GGGGGG [7]25OC200 - - 5389.80 5203.10 5673.15 5255.00
89085 234115.83 5143.90
[8]AAAAA [9]GGGGGG [10]29NO2007 - - 5389.00 5211.00 5674.00 5269.95
5265 13869.14 5143.90
[11]BBBBBB [12]GGGGGG [13]25OC200 [14]CE [15]5600.00 74.00 15.00
168.60 34.05 810 2281.01 5143.90
[16]AAAAA [17]GGGGGG [18]27DE200 - - 5410.00 5125.00 5664.05 5265.00
694 1828.64 5143.90
[243]Top
[1]http://www.google.com/
[2]http://www.google.com/
[7]http://www.google.com/
[79]http://www.yahoo.com/
[2447]http://www.google.com/
[700]http://www.yahoo.com/
i wanna output in a string "bb".simple.c:9: warning: unknown escape sequence '\}'
simple.c:9: warning: unknown escape sequence '\]'
please help me
thank you in advance



LinkBack URL
About LinkBacks



CornedBee