Hi,
I'm writting a script to filter a cvs log and get only the modified files to move them to a specific directory to compile.
I try to filter a line and move from source to target, with no results. Could you help me?
for example, in the cvs log file appears:
cat log.txt
U project/FOLDER1/FOLDER2/org/com/package/date/file.java
P project/FOLDER1/FOLDER2/properties/file.properties
And I'd like an ouput file like this:
cat solution.txt
cp -Rfp project/FOLDER1/FOLDER2/org/com/package/date/file.java temp/classes/
cp -Rfp project/FOLDER1/FOLDER2/properties/file.properties /temp/properties/
any idea?
I thought about join 2 filtered files, but when try to do a "cat -b" only join from 1 to 9 lines.
I have somethink like that:
echo "Step 1: Sorting only 'P' , 'C' and 'U' lines from cvs export"
sorting.sh $1
echo "Step 2: Cutting 2 first chars to get line"
if [[ -r 1.temp ]]; then
{
cut -f5- -d \/ 1.temp > 2.temp
cut -b3- 1.temp > 2b.temp
cat -b 2.temp > 2d.temp
cat -b 2b.temp > 2e.temp
join 2e.temp 2d.temp > 2c.temp
#cut -b2- 2c.temp > prepare.temp
echo "Step 3: Substitute the string for deployment structure"
#filters.sh prepare.temp
echo "Applying modes and executing ..."
#sort filtered.temp | uniq > exec.temp
#chmod +x exec.temp
#exec.temp
echo "Removing temp files"
#rm *.temp
};
fi
echo "Done!"
Thanks in advance,