"GET /?add=jt1777,justine,tignor,f,November_24_1983,Skeleton_,Italy HTTP/1.1" 200 34053
does anyone know how to use the sed command to cut out the extra lines or filtering like
"GET /?=jt1777,f,November_24_1983,Skeleton_,Italy HTTP/1.1" 200 34053"
but include just only the name "justine, tigor"
. Thats all I need, just the first and last name.
Any ideas???
You can use awk
echo "\"GET /?add=jt1777,justine,tignor,f,November_24_1983,Skeleton_,Italy HTTP/1.1\" 200 34053" | awk -F, '{print $2","$3}'
Explanation:
-F,
Here you're delimiting text with ,
'{print $2","$3}'
You'll print the field 2 and 3 within the delimiter ,
. If you want to print the comma, since this is being used as delimiter, it won't print so you must hardcode it ","
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments