You are not logged in.
I am going to tell you what sparked this thread first: I was reading your wiki on installing a 32bit bundled system into a 64bit system. And NO, I did not know what the heck was going on as usual. The thing is I am always curious. That is why I end up learning. Here is what sparked me... I got to the 'sed' command and did NOT understand what was going on and I dove in! What a wonderful and amazingly, useful tool. Instead of just copying commands such as:
# sed -e 's/\$arch/i686/g' /etc/pacman.d/mirrorlist > /opt/arch32/mirrorlist
# sed -e 's@/etc/pacman.d/mirrorlist@/opt/arch32/mirrorlist@g' -e '/Architecture/ s,auto,i686,' /etc/pacman.conf > /opt/arch32/pacman.conf
I took the command apart, tried it in various ways, made test files and learned what it all meant. This type of thing is happening over and over again while using Arch. Arch was extremely overwhelming at first but, I really like it that way, I tend to learn really fast this way. In the beginning it is REALLY hard though.
i have read about said and I know about substitute and global (s///g) but what through me off was -e '/Architecture/ s,auto,i686,' So I made a test file with Architecture in it.
echo "Architecture = auto" > test
then ran
cat test | sed -e '/Architecture/ s,auto,i686,'
Wow! Guys, I was so excited when I finally figured out what was going on. Through trial and error, I just learned some really cool things about said and also got better at seeing that you can use any character as the separator - like @ instead of /. See this makes me happy, when I figure something out like this. It is SO rewarding. Im like a kid at Christmas
So what is happening is I am getting this phenominal understanding of Linux by diving deep into Arch Linux. I have now swithced over my only computer to Arch Linux. I only really cared about a few windows programs and with wine I have one of them running!!
I just want to thank you all for such a great experience. I didn't know how much I love this stuff until I started with Arch Linux. Thanks again!
Last edited by AcousticBruce (2015-05-21 16:21:18)
Offline
Sed is a useful tool available on most *nix, but Arch will separate you from the windows you can't see out of (ok something was lame about that). You'll have a nice time here, and probably won't be able to use anything but Arch (that might be stretching it, but ok).
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Yes, the principals that Arch follows really attracts me to this community. I love in particular: The Arch Linux system places precedence upon elegance of design as well as clean, correct, simple code, rather than unnecessary patching, automation, eye candy or "newbie-friendliness."
Even though I am a newbie... its like tough love. I respond well to this type of environment. So I am sure I will be using Arch and I have no interest in other builds currently.
There is one other project I am thinking of doing and it is Linux From Scratch (LFS). I dont know much about this yet, but If possible I want to build a Arch-like build.
Offline
There is one other project I am thinking of doing and it is Linux From Scratch (LFS). I dont know much about this yet, but If possible I want to build a Arch-like build.
Isn't that called Gentoo?
Offline
I wanted to learn too...so i have question.
This command
echo "Architecture = auto" > test
create file named test with content "Archtecture = auto"
This command
cat test | sed -e '/Architecture/ s,auto,i686,'
in my case shows this:
Architecture = i686
Could somebody explain this? Also, what this is exacly
'/Architecture/ s,auto,i686,'
Last edited by firekage (2015-05-21 17:33:40)
Offline
Could somebody explain this? Also, what this is exacly
'/Architecture/ s,auto,i686,'
http://www.grymoire.com/Unix/Sed.html
http://www.grymoire.com/Unix/Sed.html#uh-1
How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.
Offline
I wanted to learn too...so i have question.
Could somebody explain this? Also, what this is exacly
'/Architecture/ s,auto,i686,'
Let me show you by example...
echo "hello world" | sed 's/world/universe/'
echo "hello world" | sed 's,world,universe,'
echo "hello world" | sed 's@world@universe@'
Notice all of these are the same result. This is because you can use any character you like in place of the separator.
So when you look at this '/Architecture/ ***s.auto,i686,*** that is replacing the word 'auto' with 'i686'
The /Architecture/ is like using grep.
so if you have a file that looks like this
color1 = red
color2 = red
Easy way to make this in one command. Make sure and use $ and ' ' instead of " "
echo $'color1 = red\ncolor2 = red' > test
and run this
cat test | sed -e '/color1/ s,red,blue,'
same thing...
cat test | sed -e '/color1/ s@red@blue@'
also to prove its like grep
cat test | grep color2 | sed -e 's/red/black/'
sed is very powerful and awesome. There is WAY more than this.
Last edited by AcousticBruce (2015-05-21 18:39:28)
Offline
It's like search and replace without having to open up notepad.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
...without having to open up notepad.
Um, he's using Arch Linux, no more Windows.
Offline
nomorewindows wrote:...without having to open up notepad.
Um, he's using Arch Linux, no more Windows.
Or vim or nano, or notepad++, or ...
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
AcousticBruce wrote:There is one other project I am thinking of doing and it is Linux From Scratch (LFS). I dont know much about this yet, but If possible I want to build a Arch-like build.
Isn't that called Gentoo?
I do not know much about gentoo.. I know that LFS is a bit more detailed in the setup than Arch Linux... but now that I have been successful with Arch and I have went back and looked at the docs, it makes MUCH more sense. Arch Linux has brought me a long way. What gets me is there are tutorials on youtube showing people how to install arch with a GUI. Haha, if I would have done that, I wouln't have learned much at all. In fact, next laptop I buy, I am installing Arch with the most liberty as possible and I am STILL not going to use the GUI installer or any quick setup. The installer seems to defeat the principals of Arch.
Offline
mouseman wrote:AcousticBruce wrote:There is one other project I am thinking of doing and it is Linux From Scratch (LFS). I dont know much about this yet, but If possible I want to build a Arch-like build.
Isn't that called Gentoo?
I do not know much about gentoo.. I know that LFS is a bit more detailed in the setup than Arch Linux... but now that I have been successful with Arch and I have went back and looked at the docs, it makes MUCH more sense. Arch Linux has brought me a long way. What gets me is there are tutorials on youtube showing people how to install arch with a GUI. Haha, if I would have done that, I wouln't have learned much at all. In fact, next laptop I buy, I am installing Arch with the most liberty as possible and I am STILL not going to use the GUI installer or any quick setup. The installer seems to defeat the principals of Arch.
If you put "Arch", "installer" and "youtube" in a sentence chances are it's some offshoot project like evolution/antergos/manjaro/whatever. I won't disappoint you to tell those are NOT Arch.
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
I have to say AGAIN, that Arch Linux has helped me. During my response earlier my computer overheated and shutdown with NO warning. When I started it back up, i could not startx. It gave me a errors and appearently some files couldnt be found. So I did what any linux user would do and tried to fix it. I popped in my Arch usb and loaded up. Used wpa_supplicant , mounted my partitions to the mnt and mnt subdirectories folder. Arch-chroot in the /mnt folder with bash and proceded to resync some base files and this fixed it! The way a newb feels when they start catching on to how this stuff works and get a deep understanding is incredible. I think this is why I like coding so much, lots of problems to fix and lots of creativity. And the missions statement of The Arch Way is inspiring.
I fixed my first computer breakdown!!!
Edit: The truth is, I have no idea what fixed what. I just resynced all the base files LOL. But still... anyone else that wasnt a highly skilled linux user, would have thought what I did was genius haha.
Last edited by AcousticBruce (2015-05-21 19:10:50)
Offline
I do not know much about gentoo.. I know that LFS is a bit more detailed in the setup than Arch Linux
With Arch and Gentoo you use a package manager to install the software you want, with LFS you build the toolchain and then use the toolchain you just built to build your system. LFS is a good learning experience but keeping a system up to date without a package manager is soon going to become an issue
I use Arch and Gentoo, I installed LFS twice but never really used it much after the install ... BLFS is supposed to help with that but I stalled at the pick a package manager stage because I realised all the things a distro like Arch or Gentoo does for you I would need to do myself ... and that just does not match my use case.
My order was Arch then Gentoo then LFS, for me that happened by chance but it was probably best for me in that order. I think I would have found starting with LFS more difficult.
Offline
nomorewindows wrote:...without having to open up notepad.
Um, he's using Arch Linux, no more Windows.
I see what you did there
Offline