Another sed thread


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Another sed thread
# 8  
Old 12-17-2010
Pls make sure sed command is inside for loop.
OR
We can do in following way too..
Code:
/usr/local/bin/grep Sent ${HOMELOG}/${ACCESSLOG} | /usr/local/bin/grep "from:2121" | /usr/local/bin/egrep -i "Gracias por votar por la foto $i" | wc -l | sed "s/.*/Voted for file ${i} &/" >> votaronFoto.csv

OR
Code:
/usr/local/bin/grep Sent ${HOMELOG}/${ACCESSLOG} | /usr/local/bin/grep "from:2121" | /usr/local/bin/egrep -i "Gracias por votar por la foto $i" | wc -l | awk -v a=${i} '{print  "Voted for file ",a,$1}'>> votaronFoto.csv

This User Gave Thanks to anurag.singh For This Post:
# 9  
Old 12-17-2010
First Option Worked Great!!

Thanks anurag.singh!!!!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Not able to post thread/reply to thread

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)
Discussion started by: jaydeep_sadaria
1 Replies

2. UNIX for Dummies Questions & Answers

Difference between handle to the thread HANDLE and thread identifier pthread_t

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)
Discussion started by: rupeshkp728
0 Replies

3. Programming

Parent Thread Of Child Thread

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)
Discussion started by: rupeshkp728
1 Replies

4. Programming

How to cancel a thread safely from the initial thread?

how about asynchronous canceling? or with signal? if with signal whether it effects the process? my english so badly :( :( (1 Reply)
Discussion started by: alan.zhao
1 Replies
Login or Register to Ask a Question