I am trying to use sed in order to copy partial strings from a log file.
When I wanted to copy a whole line, I used:
for file in ls Dir/logs/*NN*
do
sed -n 3,3p $file >> log_NN.csv
done
Is there a similar command that will take only part of a string, in a certain location of that line?
For example I have in line 22 of the log the following string, and I want to copy the first number to another file, then the 2nd number to a file, etc...:
step - loss: 0.6844 - acc: 0.6294 - val_loss: 0.5905
Thanks in advance for the help :)
question from:
https://stackoverflow.com/questions/65830599/using-sed-to-copy-a-string-of-x-number-of-characters-from-a-specific-line 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…