Not able to install tree comand in ubuntu
472
Package tree
is available in Universe. Check that you have it enabled:
Then just do the usual
$ sudo apt-get update
$ sudo apt-get install tree
All Ubuntu repositories (main, universe, restricted, multiverse) can be enabled by following command:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
Related videos on Youtube
Author by
vinni
Updated on September 18, 2022Comments
-
vinni over 1 year
I'm trying to filter a text that has
new lines
in open refine.The input is:
Them Spanish girls love me like I'm Aventura I'm the man, y'all don't get it, do ya? Type of money, everybody acting like they knew ya Go Uptown, New York City, bitch Them Spanish girls love me like I'm Aventura Tell Uncle Luke I'm out in Miami, too Them Spanish girls love me like I'm Aventura
The expected Result would be:
Type of money, everybody acting like they knew ya Go Uptown, New York City, bitch Them Spanish girls love me like I'm Aventura
I'm trying to get the line with the keyword and the lines before and after.
My code to do it with standard regex looks like that:
/((.*\n){2})^.*\b(New York)\b.*((.*\n){3})/m
But that doesn't work in open refine. I tried the following, but it only returns 'null'
value.match(/.*(\New York)/.*)
Any one has an idea how I could do it? I really need to keep the lines, so I cant do a
replace(/\n/,'')
before the match.-
chaos almost 10 years@Tim there IS a package called tree in the official repo: packages.ubuntu.com/trusty/tree
-
Ron Rosenfeld almost 6 yearsCould it be that the
newline
is a<cr><lf>
sequence and you need\r\n
?
-
-
KhoPhi over 8 yearsNot able to install in Ubuntu 15.10, although universe is enabled.
-
geethujoseph over 8 years@Rexford packages.ubuntu.com/wily/tree
-
KhoPhi over 8 yearsbut I have
deb http://archive.ubuntu.com/ubuntu wily main restricted
in my sources.list ? -
geethujoseph over 8 yearsWell I can't see
universe
anywere in that line... Make sure universe is not commented and dont forget to runsudo apt-get update
. Either way in that link you can download the file and install it using Software Center -
iMitwe almost 6 yearsBro, he asked in OpenRefine, you come up with Excel. What's wrong with just sticking to openrefine ?
-
Vityata almost 6 years@iMitwe - nothing is wrong with sticking with openrefine. But the question is tagged with Excel as well, thus I come up with it.
-
vinni almost 6 yearsHow would I need to change it, to get 2 lines before and after?
-
vinni almost 6 yearsOk, I got it with
value.find(/(.*\n){2}.+New York.+(\n.*){2}/).join('\n')
. Thanks! -
vinni almost 6 yearsI found a small bug in the regex. It doesn't match if the searched word is just before a new line.
.+
doesn't match new line characters. Do you have any idea how I could also match for a word in front of a new line? I tried[\s\S]
but this matches each line -
Ettore Rizza almost 6 years@vinni It's often better to use multiple Regex rather than trying to build one that covers all cases. But you can try something like this :
value.find(/(.*\n){2}.+New York.+(\n.*){2}|(.+\n){2}.*New York(\n.*){2}/i).join('\n')
(note : I added a "i" at the end of the regex, so this one is case insensitive. It finds "New York" as well as "New york") -
vinni almost 6 yearsAh, that's a good hint. Thanks! This seems to work:
(.*\n){2}(.+|)Kreuzberg(.+|)(\n.*){2}
Do you think there is an issue with that? -
vinni almost 6 yearsOk, this is my final solution:
(.*)\n(.*)\n(.*(Kreuzberg).*)\n(.*)\n(.*)