Code:
a non useful header
a non useful header
string
stringsomething
lots of ah
lots of ah
meaningful data
lots of ah
lots of ah
stringsomething
meaningful data
--non useful tail
--non useful tail
and spaces and tabs of course for a finishing touch
After processing with:
Code:
lista=$(sed -n '/^'"$1"'/,$p' $2 | sed '/'"$1"'|ah|-/ d')
I got
Code:
meaningful data
meaningful data
meaningful data
meaningful data
meaningful data
meaningful data
A string and a scalar, the first column is a name, and the second is the data, a value.
Problem is i need both of them, not only one as i originally thought, so
i have to do this:
Code:
$name_of_socket=$(sed -n '/^'"$1"'/,$p' $2 | sed '/'"$1"'|ah|-/ d' | awk '{print $1}')
$socket_value=$(sed -n '/^'"$1"'/,$p' $2 | sed '/'"$1"'|ah|-/ d' | awk '{print $2}')
It is the same command, kind of repetitive