« first day (195 days earlier)    last day (14 days later) » 

8:25 AM
hi^^
 
hi
i get your point.
working to short out your code.
@chaos
 
@Raj would you please put your answer. I need both of your codes thanks for help
 
working on that. No, if i found any i'll merge it with chaos.
 
ok any way thanks
 
Try this, it is a bit more dynamic without variables
`cat /home/$(whoami)/.mozilla/firefox/$(awk -F"Path=" '/^Path/{print $2}' /home/$(whoami)/.mozilla/firefox/profiles.ini)/addons.json | python -c 'import json,sys;obj=json.load(sys.stdin);
for (i, x) in enumerate(obj["addons"]):
print x["name"]'`
without quotes sry:
cat /home/$(whoami)/.mozilla/firefox/$(awk -F"Path=" '/^Path/{print $2}' /home/$(whoami)/.mozilla/firefox/profiles.ini)/addons.json | python -c 'import json,sys;obj=json.load(sys.stdin);
for (i, x) in enumerate(obj["addons"]):
print x["name"]'
 
8:39 AM
useless use of cat
@chaos
 
sry it's better with pastebin:
 
use fixed font.
option.
 
take the RAW Paste Data
@AvinashRaj why useless? phyton reads from stdin
fixed font?
 
@chaos got a oneliner command.
@alex ^^
wanna know?
why no reply?
are you there?
without using python.
 
am here
 
8:48 AM
how about this?
grep -oP '(?<=\},\"name\":\")([^"]*)' ~/.mozilla/firefox/$(grep -oP 'Path=\K.*' /home/$USER/.mozilla/firefox/profiles.ini)/addons.json
going to edit your answer.
 
wait
keep the python answer too
because python parses json
your answer greps json
if something changes your answer might not work anymore
 
there is no chance of a change.
just try on your system.
let me know whether it works or not?
@alex you also ^^^
 
it worked, but mozilla can change the part
json should be read with a json parser, as xml should be read with a xml parser...
 
yep, i know.
 
but its ok, its also a good answer, thanks
 
8:52 AM
first give a try to that one liner. If it fails then go for the python option.
 
yep
and maybe change the $USER to $(whoami)
not every shell has the $USER variable set
 
someone will surely argue "How dare you parse a json file with grep?"
lol:-)
 
as usually^^ =)
 
@chaos it's your's.
 
thats why i wrote it with a json parser =)
 
8:53 AM
and +1 from me.
let's remove the comments.
 
changed, thanks
 
Gotta go. Bye :-)
 
bye
 

« first day (195 days earlier)    last day (14 days later) »