Thanks Jean-Pierre for opening my eyes !
I overlook this is the shell programming and scripting forum
In any case, awk "system()" behave the same way as the C standard library one, i.e. it expands its parameters. Too bad aobai provides no more clues ...
There is nothing wrong with the code in the original post. If it's not working, please be clear about how it is failing. Post any error messages if any. Also, try enabling tracing in the shell that's being used:
Also, please post the entire program, or a minimized version that exhibits the same problem. Perhaps the error is in the surrounding code. Although, we can't even guess because not only have you not specified the error at all, there is even some doubt as to what programming language is being used.
Assuming that it's AWK, here's a test run showing how globs work just fine with the system function:
system.awk
The first line is ls showing us that the files were created successfully by touch. The second line is the trace output from 'set -x', showing the rm command that will run (as you can see, the *.txt pattern was expanded correctly). The final line is ls complaining that nothing matched '*.txt', which is expected since in that empty directory, there is nothing for the pattern to match and no file matches the unexpanded string '*.txt'.
Hi All
We have a file with statements like below
SELECT BLAH,BLAH,... FROM TABSCHEMA1.TABSCHEMA1 WITH UR
SELECT BLAH,BLAH,... FROM TABSCHEMA2.TABSCHEMA2 WHERE BLAH=1 WITH UR
.
.
. and so on
We want the word Anything after FROM<SPACE> and stop when the word Encounter Space.... (11 Replies)
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
I have file with following data,
http://www.some.com/web11.html
http://www.some.com/web/112.html
http://www.some.com/web/21.html
http://www.some.com/342.html
http://www.some.com/plk.html
http://www.some.com/abh.html
http://www.some.com/yte.html
http://www.some.com/tyr/098.html... (4 Replies)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Hi,
Earlier I was using the below expression to identify the file names
ls PRODUCT_LIST__CITIES_????????.dat
file names :
PRODUCT_LIST_GB_CITIES_????????.dat
PRODUCT_LIST_IE_CITIES_????????.dat
but now the file names have been changed as below
... (1 Reply)
CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error.
source $CA_VERSION_DATA
if * ]
then
echo "CA_RELESE $CA_RELEASE is invalid"
exit -1
fi
+ source /etc/ncgl/ca_version_data
++ CA_PRODUCT_ID=samxts
++ CA_RELEASE=6
++ CA_WEEK_NO=7
++... (3 Replies)
hi all,
i have a text file with below content
...............................
...............................
...............................
...............................
%%Page: (4) 4
%%PageBoundingBox: 34 -30 584 831
%%BeginPageSetup
%%BeginFeature: *PageSize A4
595 842... (7 Replies)
Hi
I have to extract the first field and the last %field of the following out put..
/home (/abc/def/bhd ) : 522328 total allocated Kb
319448 free allocated Kb
... (2 Replies)
Is it possible to combine a regular expression with a aritmetical expression? For example, taking a 8-numbers caracter sequece and casting each output of a grep, comparing to a constant.
THX! (2 Replies)