LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Want to upgrade coreutils on Ubuntu 10.10 (https://www.linuxquestions.org/questions/linux-newbie-8/want-to-upgrade-coreutils-on-ubuntu-10-10-a-845126/)

ghantauke 11-18-2010 12:53 PM

Want to upgrade coreutils on Ubuntu 10.10
 
Hi,

I've got bash 4.1.5(1) at the moment. I had bash 4.1.7(2) version in my university pc. Certain commands aren't working as it should in my version. Could anyone please tell me how to install bash 4.1.7(2) version in my pc? I'm using ubuntu 10.10 OS.

szboardstretcher 11-18-2010 01:09 PM

Quote:

Originally Posted by ghantauke (Post 4163415)
Hi,

I've got bash 4.1.5(1) at the moment. I had bash 4.1.7(2) version in my university pc. Certain commands aren't working as it should in my version. Could anyone please tell me how to install bash 4.1.7(2) version in my pc? I'm using ubuntu 10.10 OS.

Install fedora 14?

Seriously, have you tried enabling the "universe" ubuntu repository or whatever it is called, to see what version Bash is at?

John VV 11-19-2010 02:19 AM

Quote:

Certain commands aren't working as it should in my version.
????
what commands ???
What are you doing ?
is it a script ?
or a program?

colucix 11-19-2010 02:47 AM

Yes, as John VV pointed out there should not be many differences between 4.1.5 and 4.1.7 since it is a minor release, usually to fix bugs. Please, post an example of what doesn't work with the older version.

i92guboj 11-19-2010 03:35 AM

I doubt (really really doubt) that bash is your problem. Please, give us details about the symptoms.

ghantauke 11-19-2010 08:30 AM

sort -d MEMORY | uniq -c | sort -r >FILE1

The contents in the MEMORY file aren't sorted right.

GrapefruiTgirl 11-19-2010 08:32 AM

Neither `sort` nor `uniq` are bash built-in commands. Therefore, if the results of the commands you gave above, differ on two different machines, then it is because `sort` or `uniq` are different, or the file MEMORY is different.

ghantauke 11-19-2010 08:37 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 4164367)
Neither `sort` nor `uniq` are bash built-in commands. Therefore, if the results of the commands you gave above, differ on two different machines, then it is because `sort` or `uniq` are different, or the file MEMORY is different.

File MEMORY are the same for both machines. So it must be 'sort' and 'uniq'. How do i go on about fixing this problem then?

GrapefruiTgirl 11-19-2010 08:42 AM

What precisely *is* the problem?

Please, either explain the sorting difference with such precision that there can be no mistaking it, or show us (copy + paste) the original input file, and then show us (copy + paste) the difference in the sorted output of both machines, so we can see what's what.

In case it becomes relevant, also post the versions of each of the tools in question, on each machine.

ghantauke 11-19-2010 08:56 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 4164381)
What precisely *is* the problem?

Please, either explain the sorting difference with such precision that there can be no mistaking it, or show us (copy + paste) the original input file, and then show us (copy + paste) the difference in the sorted output of both machines, so we can see what's what.

In case it becomes relevant, also post the versions of each of the tools in question, on each machine.

at this moment i can't give the exact difference of the two different version since i have only access to one pc. just assuming that it is different at this point will be sufficient. all i want to know is how to change the version of sort.

sort --version
sort (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

thats the version of sort in the university pc. i want to change the version (whatever it may be) of sort in my pc to the one in the university pc. excuse my noobiness for turning this simple question into a complicated one.

GrapefruiTgirl 11-19-2010 09:08 AM

OK, for the simple question of "how to change version of `sort`" - on Ubuntu, the first/best method would be your package manager. I don't use Ubuntu, so if there's a way to use your Synaptic package manager, or apt-get, to install a specific version of a package, someone else will need to guide you on that, or you'll have to poke around and figure it out yourself. Note that the coreutils package contains a lot more than just `sort` and `uniq`, so trying to upgrade this is probably not the most ideal thing to do anyways. Before trying this, I would be absolutely, positively certain that doing it is both necessary, and practical, to accomplish whatever you're trying to do. I don't believe it is.

If you can't use the package manager, then you're looking at building coreutils from source, making a package, and upgrading or installing it manually. And if there's a chance frigging up your machine with the first method, then the chance is tenfold greater using this method. Again, I question whether this is really necessary to accomplish your goal, but hey, it's your machine.

EDIT: By the way, both above suggestions apply equally well (or not) for bash also, if you want to upgrade it too.

When you are able (i.e. you have access to both or the other machine) please show us how the outputs differ on the two machines after running your sort command pipeline.

ghantauke 11-19-2010 09:18 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 4164406)
OK, for the simple question of "how to change version of `sort`" - on Ubuntu, the first/best method would be your package manager. I don't use Ubuntu, so if there's a way to use your Synaptic package manager, or apt-get, to install a specific version of a package, someone else will need to guide you on that, or you'll have to poke around and figure it out yourself. Note that the coreutils package contains a lot more than just `sort` and `uniq`, so trying to upgrade this is probably not the most ideal thing to do anyways. Before trying this, I would be absolutely, positively certain that doing it is both necessary, and practical, to accomplish whatever you're trying to do. I don't believe it is.

If you can't use the package manager, then you're looking at building coreutils from source, making a package, and upgrading or installing it manually. And if there's a chance frigging up your machine with the first method, then the chance is tenfold greater using this method. Again, I question whether this is really necessary to accomplish your goal, but hey, it's your machine.

When you are able (i.e. you have access to both or the other machine) please show us how the outputs differ on the two machines after running your sort command pipeline.

I want to know how to change it anyway, just for experience. I can't survive being a linux user without knowing how to manage it. Greatly appreciate your effort Grapefruitgirl. Would be grateful if anyone else could help me out.

GrapefruiTgirl 11-19-2010 09:26 AM

I suggest you update your thread title, maybe something more like:
Code:

Want to upgrade coreutils on Ubuntu 10.10
That'll maybe help attract the attention of Ubuntu users who can help you.

Cheers & good luck!

ghantauke 11-19-2010 09:33 AM

Quote:

Originally Posted by GrapefruiTgirl (Post 4164415)
I suggest you update your thread title, maybe something more like:
Code:

Want to upgrade coreutils on Ubuntu 10.10
That'll maybe help attract the attention of Ubuntu users who can help you.

Cheers & good luck!

Interesting suggestion BUT!! how do i do that? :D

GrapefruiTgirl 11-19-2010 09:33 AM

Quote:

Originally Posted by ghantauke (Post 4164427)
Interesting suggestion BUT!! how do i do that? :D

My apology!

Click "Edit" and then "Advanced" on your first post. Then on that "Advanced Editor" page, change the title.

:)


All times are GMT -5. The time now is 11:12 AM.