I am a newbie and what I have is a captured file of content. I want to be able to grab 2 pieces of data, multiple times and print them to the screen.
DataFile
owner: locke
user: fun
data size: 60
location: Anaheim
owner: david
user: work
data size: 80
location: Orange
my script starts with
#!/bin/bash
for i in `cat DataFile|grep owner |awk -F ':' '{print $2}'`
echo $i
done
but I can't figure out how to pull the data size content.
I am looking for output like...
locke
60
david
80
etc.
Can someone help me to get started?