I have one .csv file with all the file names(.c,.h,.sm,.txt etc).....
Now i have compared two baseline in UCM and got a report in .txt file,which looks like this......
file_list.csv is the csv file.
log.txt be the above mentioned file
Code:
file_list=`sed 's\,\ \g' file_list.csv
for file in $file_list
do
grep -q $file log.txt
if [ $? -eq 0 ]
then
printf "*%s",$file
else
printf "%s",$file
fi
done >new_file_list.csv
I have used just grep to see whether the file has changed or not.
Thanks for your reply....
But I did not get..
i am expecting some script which will check for the .c,.h,.txt in the log.txt file and then according to that update in the .csv file...
Hopefully u got my point....
Hi,
May be i m wrong but try this
I think in the firstline of command ` is missing in end.
Put it and try u'll definetly get desired answer.
Code:
file_list=`sed 's\,\ \g' file_list.csv`
for file in $file_list
do
grep -q $file log.txt
if [ $? -eq 0 ]
then
printf "*%s",$file
else
printf "%s",$file
fi
done >new_file_list.csv
Hi
I need some help with a task, i am an absolute newbie to any form of shell scripting and request guidance.
I have been building a proxy server using the apache mod proxy currently my solution is working , but i need to automate the process , suppose if any changes need to be made on... (0 Replies)
Hi All,
I am very new to UNIX and I have tried this for a longtime now and unable to crack it....
There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day.....
eg:
String is "work started"
The log entry is as below:
... (1 Reply)
Hi Friends,
I'm writing code to update a CSV file by multiple PERL scripts.
I've around 2000 PERL scripts which need to register their entries into a CSV file. Hence, I'm inserting following line code in all the 2000 PERL scripts.
open(FILE,... (5 Replies)
I have an extremely large csv file that I need to search the second field, and upon matches update the last field...
I can pull the line with awk.. but apparently you cant use awk to directly update the file? So im curious if I can use sed to do this... The good news is the field I want to... (5 Replies)
Hello,
I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^
Here is what I'm trying to achieve :
file1:
test filea 3495;
test fileb 4578;
test filec 7689;
test filey 9978;
test filez 12300;
file2:
test filea... (11 Replies)
Hi,
Data file path (.txt)
Control file(.ctl)
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me... (1 Reply)
Hi, my question is quite simple: Can I update a csv file which is held on a unix box (and which a script on the same box uses) with Microsoft Excel running in a windows environment? Or, is there a free spreadsheet package available to run in unix that will update my csv file. I know it's easy to... (5 Replies)