2
I currently have a cookie.txt file that looks like so.
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file! Do not edit.
.youtube.com TRUE / FALSE 1547252593 GPS 1
.youtube.com TRUE / FALSE 1552434792 PREF f1=50000000&hl=en
.youtube.com TRUE / FALSE 1562802793 VISITOR_INFO1_LIVE inJgRBNv-3I
.youtube.com TRUE / FALSE 0 YSC 9U9ILYfJDyA
.youtube.com TRUE / FALSE 0 s_gl 1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==
I'm trying to use awk
to read the cookie.txt file and from each of the .youtube.com
lines get the last 2 fields, ie GPS 1
, PREF f1=50000000&hl=en
, etc.
Can this be done with awk ignoring the base 3 comment lines?
Space is defauls separator, so its not need to be defined explicitely – Romeo Ninov – 2019-01-16T20:32:19.443
1@Romeo Ninov: Thanks. I simplified my answer. – zx485 – 2019-01-16T20:33:26.210