hello
im new here so i want to say hi everybody
i have to write a script and im newbie i hope that in this forum are many ppl who knows subject
i have hundrets folders. in each folder is a file name trace.txt. each trace.txt has a lot of tracert's results separates with "-----" it lookes like that :
tracert results
-----
tracert results
-----
tracert results
-----
i have to count lines in each block between "-----". by this i mean counting how many points are between machines. results should be writen into file call for example count.txt with one number per line. for example
10
10
10
11
13
14
10
does anyone have idea how to do this? i think i should use awk, but awk is hard to learn and im getting lost in this subject i was able to make a part of this script, but the most important part i cannot wrie. i made something like this :
#!/bin/bash
for node in /home/michale/results/results_10h/*
do
if [ -f $node/trace.txt ]
then
MISSING PART :)
else
echo " there is no file to analyze! "
done
sorry for my english, im not using it every day.