Im trying to access variables through sed, however none of the answers I've seen on the forums has worked for me. (All kind of quotes) Or maybe Im just placing them in a wrong place or something. Anyway, I tried many options before actually posting.
Here's my code
*Up to this part works fine*
Now I need to add some characters at the beginning of each line of that file I just created:
This doesnt work. And I believe I've tried with many combinations of quotes already.
I get for all combinations 'Voted for file 10' *correctValueHere*
what exactly is j here. what is it's value.
Please post few input file data and expected output.
To me it looks like j is actually count which varies from 1-10 and if so, then we need to put sed command inside for loop
and use i variable (instead of j) to get values from 1 to 10.
I guess current result you gave is from votaronFoto.csv file.
If it has all lines with value 10 means there was no record with values 1-9 as outcome of egrep and you result came for 10.
To confirm this, you may do some kind of debgging like run only for CONTADOR value 1 OR only for 2 OR may be for 1-9 and see if you get any record in votaronFoto.csv.
OR for debugging purpose, you may created different file for each count.
And see if you get some records in all files.
I'm just suggesting some ways to check why votaronFoto.csv has records only for value 10.
File votaronFoto2.csv should have "Voted for file 10" at the start of every line.
This is the full outcome of file votaronFoto2.csv
So first file is working ok.
I dont get why is not taking the same value $i for the second file as it did work for the first line.
Last edited by Franklin52; 12-18-2010 at 10:58 AM..
Reason: Please use code tags
Dear Moderator
I am not able to post any new thread or post reply to mine old thread.
Kindly help as i am stuck on one problem and needed suggestion.
Regards
Jaydeep (1 Reply)
This question might be silly but its confusing me a bit:
What is the difference between handle to the thread HANDLE and thread identifier pthread_t?
---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ----------
Sorry I saw details and HANDLE is in windows and... (0 Replies)
Parent Thread Of Child Thread
Suppose a process creates some threads say threadC and threadD.
Later on each of these threads create new child threads say threadC1, threadC2, threadC3 etc. So a tree of threads will get created.
Is there any way to find out the parent thread of one such... (1 Reply)