I have a text file with following content in it (for example):
In first line the "One", second"Two " & " Three " and also"Four ".
In second line also nested "foo "bar" baz""zoo" patterns.
I tried to had all strings between a pair of quotes and finally I ended up by this command:
grep -Po ...
@KasiyA Why are you insisting on grep? It just isn't the right too for the job.
Also, that is likely to get closed since it's cross posted.
The UNIX philosophy is to use many small programs in a pipeline, why are you objecting ti this? Also, grep -o is GNU-specific, it only works on Linux systems and you can't rely on it.
@KasiyA now they're nested? Forget grep, it's just not made for this.
if it was easy I was able to find it by myself. And I know I can solve it by using multiple grep command:grep -Po '"\K[^"]+"' file | grep -oP '[^"]*' or another command combination with grep. So I could not solve it by using just one grep. and I asking on SO. — KasiyA6 hours ago
@KasiyA Yes, I know that you want to do it with grep only. I and many others have explained why that is not possible and why grep is not the right tool for the job. You still have not explained why you don't want to combine grep with something else. Why is it that you want to stick to grep alone?
On AU I mentioned How can I achieve/print all of my patterns just using one command? (every command you can answer) I tried with grep for myself. On SO I want to remove character at the end of result . If you are sure both of question are same, so I don't have any problem about that. thank you for attention :)
@KasiyA I'm not upset, I don't care. It's your work, not mine. Users are answering you offering different tools because those tools can work. You keep insisting to use grep for this and grep can't do it. I just don't understand why you insist this way.
@KasiyA I tried, but I've failed too: the closest is grep -Po '"\K[^"]+(?=")' or grep -Po '"\K *\w+ *'. There are many problems here - your quotes are nested, starting and ending points are not necessary alphanumerical (you want spaces too if I correctly understand), and also you need to use perl regexp together with -o option. It is very hard to fulfil all those needs.
@KasiyA if you cannot find a solution to your problem using tool X then that's telling you that you're probably trying to do something that you shouldn't be!
@KasiyA - I urge you to take the advice of several others and stop trying to force a round peg in a square hole.
I was running make test for python and I had to close my laptop, so my PuTTY session ended on my side. If I do ps -aux or users on the box, however, I see that my session is still there... how can I know when make test is done running? I wasn't sure if this was post worthy
I installed Debian sid with Xfce and I would like to change the language used in the interface. I would like to set the language to English (US) and not French anymore.
The following command works only for root:
# dpkg-reconfigure locale
which has now the good locale:
# locale
LANG=en_US.UTF...
@terdon I think Locale is probably the solution. I changed my locale to EN.US with the dpkg-reconfigure locale but the change is active only for root. And the dpkg command does not work launched as a normal user
and the Debian wiki webpage about locale doesn't indicate how tho set the locales for normal user (just root)
It does, further down. You would need to either select the locale from GDM or whatever you use on login or set the relevant variables in your ~/.profile.
Well, it doesn't say it's for regular users explicitly, but it should work if you change it in ~/.profile.
@ppr Add these things to your question. Two of our top users are quite good at locale stuff, if you add more details they might take an interest. En plus, ils sont français donc peut être ils ont déjà vécu çà :)
I've been trying to get cron to execute these two scripts to schedule and post on twitter, tumblr, facebook and linkedin. It worked once and never again.
<?php
require '/opt/bitnami/apps/wordpress/htdocs/wp-load.php';
include('/opt/bitnami/apps/wordpress/htdocs/wp-content/themes/yeelloe/schedu...