Re: bash instead of csh (completely)
On 4 June 2010 14:56, Stefan Miklosovic wrote: > Hi list, > > title says it, i would like completely remove csh and install bash > instead. As far I know, csh is build in system, could I remove it > manually and install bash (of course, in reverse order :D) > > Are there such dependencies on csh? I know that real system scripting > is done via /bin/sh > co absence of csh shell should not break system. > > Am I wrong ? Entirely removing [t]csh sounds like a frustrating exercise in futility, but have fun. But before you switch your root shell to something that resides not in your root partition: http://forums.freebsd.org/showthread.php?t=14676 -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
On Fri, Jun 04, 2010 at 04:03:42PM -0400, Jerry B. Altzman wrote: > On Fri, Jun 4, 2010 at 14:59, Chris Rees wrote: > > > Why would you want to do that? > > > To get rid of csh? > http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ As pointed out already (at least twice), that is about csh *programming*. What this means is that nothing in that screed says that having csh installed on your system is "bad". If you actually buy everything that Mr. Christiansen says about how csh is "bad" for programming (and I don't buy everything he says there, though I do agree with him on a lot of other topics, particularly where Perl is concerned), you still have no reason based on that screed to avoid using csh (or tcsh) as your interactive shell. Furthermore, there are reasons you shouldn't use bash for scripting. It is rather dependency-heavy, for a shell, and if you're going to write shell scripts you should really try to write them to be as simple, and as widely understandable and portable, as possible. This basically means sh (the Bourne shell) rather than csh, tcsh, bash, zsh, ksh, et cetera. Even the sh-emulation that bash provides, and that many Linux systems use instead of a "real" sh, is less than perfect in that regard -- but it's close enough for government work, I suppose. I'm about to get very opinionated, so feel free to stick your fingers in your ears if you don't like what I have to say: If you get to the point where your programming efforts are so sophisticated that you can't make do with sh, you should be using a "real" programming language, rather than a shell that happens to allow scripting. This means that by the time sh (with grep, awk, et cetera) isn't good enough, you should really consider using something like Perl or Ruby. By the time sh isn't really sufficient, you're talking about "real" programming, by which point the lack of clarity of the syntax of the typical shell languages can become a real thorn in your side when it comes to maintenance. Maybe it's just me, but just as I don't see any particular need for MS Access as a DBMS when it's overlapped by spreadsheets and SQLite on one end and by a variety of more "serious" DBMSes like PostgreSQL on the other end, I don't really see much point for bash as a scripting language when it's significantly overlapped by sh on one end and Perl, Ruby, et cetera on the other end. I suppose your mileage may vary. Anyway . . . ultimately, my point is that I love tcsh as an interactive shell, and never use it for "programming". I find it odd that people want to do programming in a typical Unix shell other than simple scripting in sh when there are such better options available. Perl is even more ubiquitous than bash. Why not just use that for scripting if you want more than sh? -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpwjTRSVHMj7.pgp Description: PGP signature
Re: bash instead of csh (completely)
>I dont want to start flame war about linux vs bsd but ... :) >Before I start to explain what I want to do, I want you know >I consider freebsd fr away better than linux in a lot of ways. >(it is also a reason I want to build something upon bsd instead of >linux, there are so many advantages ... ok, this post isnt about that :)) You're right -- it isn't about that. Don't get sucked into some stupid argument. Bash isn't Linux. Linux isn't bash. If you want to use another shell, just use it. Bear in mind that if you install it from FreeBSD Ports, then it and it's dependencies may not be available in the event of an emergency, if they live on a partition separate from /. So unless you go to the trouble of building a statically-linked bash and installing it in /rescue or /bin or whatever, I wouldn't change root's shell to bash. However, others encountered this problem, and made a default account called "toor" that is basically a root account with another shell. You could use that with bash instead, and leave root with a shell from the base system. Whatever you decide to use for user accounts and your own scripts, variables like MAKE_SH and SH in make.conf will dictate what is used for building the base system and ports. If you change these to bash, you may break some builds. ... >What I still miss is a way how to "bend" freebsd to my needs. In >linux, it is easy >as hell, remove this, change that, and it still runs. I am afraid that >if I cut off some >parts of system, I will not benefit from it anymore. For example, I >install minimal bsd, >but it contains still things I do not need (some dir like "games" and other >stuff or some ancient groups in /etc/groups like uucp, proxy,games, dialer (??? >in year 2010, who use it?) and so on. > >So I am afraid to be so "brutal" to just remove it ... It's just a matter of learning what depends on what, which takes a bit of time. If you're happy with a ~150MB base system, you can just use the WITHOUT_* knobs in src.conf(5) and the make delete-old(-libs) targets to rip out a bunch of stuff. If you want it even smaller, you'll have to use picobsd(8), or nanobsd(8) (both of which require some effort to figure out dependencies), or hack the base system sources yourself. > >FreeBSD has another philosophy than Linux, but i feel Linux is more >"customizable". Maybe some Linux distros are slightly easier to trim than the stock FreeBSD, but only slightly. Once you become more familiar with FreeBSD, I'm sure that you will see the possibilities for slimming it down. If you are still not satisfied, you could use a hybrid system like Debian's GNU/kfreebsd: http://www.debian.org/ports/kfreebsd-gnu/ or Gentoo/FreeBSD: http://www.gentoo.org/proj/en/gentoo-alt/bsd/fbsd/ But these are newer, experimental systems, with all that implies. >I think I have to more study about /usr/src/ :) For example, I would >like to know, >how to install something into other dir and no to default one. Think about >port. >All to /usr/local/ ... and so on. But what if I want to install it in >/ExtraStuff ? How do >I do it in "make install clean" way? Change port's make file ? no way . Read build(7), release(7), ports(7), src.conf(5), make.conf(5), /usr/ports/Mk/bsd.port.mk, /usr/src/Makefile, and the tail of /usr/src/UPDATING, for a start. You'll want to look at setting DESTDIR, LOCALBASE, etc. It's all there. Good luck. b. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
On Fri, Jun 4, 2010 at 10:54 PM, Stefan Miklosovic wrote: > What I still miss is a way how to "bend" freebsd to my needs. In > linux, it is easy > as hell, remove this, change that, and it still runs. I am afraid that > if I cut off some > parts of system, I will not benefit from it anymore. For example, I > install minimal bsd, > but it contains still things I do not need (some dir like "games" and other > stuff or some ancient groups in /etc/groups like uucp, proxy,games, dialer > (??? > in year 2010, who use it?) and so on. You're aware of nanobsd(8)? -cpghost. -- Cordula's Web. http://www.cordula.ws/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
Hi all, First of all, thank you for your quick answers, I really appreciate it. I dont want to start flame war about linux vs bsd but ... :) Before I start to explain what I want to do, I want you know I consider freebsd fr away better than linux in a lot of ways. (it is also a reason I want to build something upon bsd instead of linux, there are so many advantages ... ok, this post isnt about that :)) In work, we try to do some kind of linux distro, it is based on slacware. I am not a guy who lead it, but in the way we are developing it, I think it is bad idea at all. Firstly, we try to do minimal slackware installation as much it is possible, so now we are about 2.6.34 kernel, minimum kernel modules, no man or docs, files you do not need for sure are removed. We ended with quite usable system with quite neccessary utilities. It has about ~150 MB. But I think with this process, we just cut ourselves from such things like system upgrade (if slackware would have someone :D), package upgrade (we nearly all do manually, compiling from source) and so on ... Note that this distro is not something massively distributed, just for our purpose, but problems remains. While I always inclined to *bsd and not used linux more as it was a duty, I want to do it in bsd way. So set up minimal bsd without things I do not need but still stay in touch with things like package system, ports (its the same) and system upgrades / updates. I should write my own installer and so on. What I still miss is a way how to "bend" freebsd to my needs. In linux, it is easy as hell, remove this, change that, and it still runs. I am afraid that if I cut off some parts of system, I will not benefit from it anymore. For example, I install minimal bsd, but it contains still things I do not need (some dir like "games" and other stuff or some ancient groups in /etc/groups like uucp, proxy,games, dialer (??? in year 2010, who use it?) and so on. So I am afraid to be so "brutal" to just remove it ... FreeBSD has another philosophy than Linux, but i feel Linux is more "customizable". But understand that it is advantage and disadvantage too ... I think I have to more study about /usr/src/ :) For example, I would like to know, how to install something into other dir and no to default one. Think about port. All to /usr/local/ ... and so on. But what if I want to install it in /ExtraStuff ? How do I do it in "make install clean" way? Change port's make file ? no way . On 6/4/10, Michael Powell wrote: > Stefan Miklosovic wrote: > >> Hi list, >> >> title says it, i would like completely remove csh and install bash >> instead. As far I know, csh is build in system, could I remove it >> manually and install bash (of course, in reverse order :D) >> >> Are there such dependencies on csh? I know that real system scripting >> is done via /bin/sh >> co absence of csh shell should not break system. > > Why do you feel it is necessary to completely remove csh? It is part of the > base install of the OS and does not prevent you from installing and using > Bash should you choose. Since these are not mutually exclusive I see no > reason to remove csh. Just leave it be. Arbitrarily 'removing' stuff from > the base system without relevant reason is more likely to create a problem > where none existed previously. > > You can install Bash from ports. You should know that it is a third party > userland application at this point. What you will find out some day when > /usr won't mount and you're sitting in single-user mode trying to recover > the box is bash will not be working. And if you made the mistake of changing > root's shell to bash you will not be a happy camper. > > You are certainly free to use whatever shell you want as a user. Don't mess > with root's shell. I saw once some highly questionable so-called > 'benchmarking' where it was claimed that bash is 4 times slower than > anything else. My own $.02 is the fixation on bash is more a result from > people coming over to FreeBSD from Linux, and trying to drag Linux > methodologies along with instead of looking at FreeBSD fresh and learning > new stuff. While there is a lot of similarity and overlap, FreeBSD is *not* > just another Linux distro. > > -Mike > > > > > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
On Fri, 4 Jun 2010 16:03:42 -0400, "Jerry B. Altzman" wrote: > On Fri, Jun 4, 2010 at 14:59, Chris Rees wrote: > > > Why would you want to do that? > > > > > To get rid of csh? > http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ The article you mentioned discusses the topic "Why shouldn't I program in csh?" As the OP already noted correctly, in FreeBSD scripting is done by /bin/sh, the Bourne shell. Most people scripting on FreeBSD do also use sh. In fact, I don't know anybody seriously scripting in csh. In terms of dialog shell quality, there surely are better solutions than bash. Allthough bash is most common, shells like ksh or zsh are also very powerfull (and still have compatibility to sh). Personally, there are some things regarding dialog use that csh does better (!) than bash, but that's to be seen as what it is, a very individual point of view. Again, why get rid of csh when it's enough just not to use it? System scripting is sh, and using chsh, modification of adduer behaviour or different settings in /usr/share/skel bash can be made the default dialog shell - no big deal. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
"Jerry B. Altzman" writes: Hi, > To get rid of csh? > http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ This link is about csh *programming*, as standard scripts in FreeBSD use sh, this is pointless. Regards -- Ol: ..un plan perdu au fond d'une armoire dont seul Steve Jobs a la clé. BL: Qu'il a laissée dans un pantalon déposé chez un teinturier dont il a perdu l'adresse et le ticket ! -+- BL in Guide du Macounet Pervers : Bien cacher sa stratégie -+- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
On Fri, Jun 4, 2010 at 14:59, Chris Rees wrote: > Why would you want to do that? > > To get rid of csh? http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ //jbaltz -- jerry b. altzmanjba...@gmail.com www.jbaltz.com foo mane padme hum twitter: @lorvax ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
Stefan Miklosovic wrote: > Hi list, > > title says it, i would like completely remove csh and install bash > instead. As far I know, csh is build in system, could I remove it > manually and install bash (of course, in reverse order :D) > > Are there such dependencies on csh? I know that real system scripting > is done via /bin/sh > co absence of csh shell should not break system. Why do you feel it is necessary to completely remove csh? It is part of the base install of the OS and does not prevent you from installing and using Bash should you choose. Since these are not mutually exclusive I see no reason to remove csh. Just leave it be. Arbitrarily 'removing' stuff from the base system without relevant reason is more likely to create a problem where none existed previously. You can install Bash from ports. You should know that it is a third party userland application at this point. What you will find out some day when /usr won't mount and you're sitting in single-user mode trying to recover the box is bash will not be working. And if you made the mistake of changing root's shell to bash you will not be a happy camper. You are certainly free to use whatever shell you want as a user. Don't mess with root's shell. I saw once some highly questionable so-called 'benchmarking' where it was claimed that bash is 4 times slower than anything else. My own $.02 is the fixation on bash is more a result from people coming over to FreeBSD from Linux, and trying to drag Linux methodologies along with instead of looking at FreeBSD fresh and learning new stuff. While there is a lot of similarity and overlap, FreeBSD is *not* just another Linux distro. -Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
Am 04.06.2010 20:56, schrieb Stefan Miklosovic: title says it, i would like completely remove csh and install bash instead. As far I know, csh is build in system, could I remove it manually and install bash (of course, in reverse order :D) What do you want to achieve with this? Installing shells/bash from ports followed by a "chsh" or "vipw" is not sufficient? If you really want a system without csh please have a look at src.conf(5) which has the knob you want: WITHOUT_TCSH Set to not build and install /bin/csh (which is tcsh(1)). If you add "WITHOUT_TCSH=YES" to your /etc/src.conf you probably can get rid of csh after the next buildworld with the commands "make delete-old; make delete-old-libs" Uwe ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
On Fri, 4 Jun 2010 20:56:02 +0200, Stefan Miklosovic wrote: > Hi list, > > title says it, i would like completely remove csh and install bash > instead. As far I know, csh is build in system, could I remove it > manually and install bash (of course, in reverse order :D) > > Are there such dependencies on csh? I know that real system scripting > is done via /bin/sh > co absence of csh shell should not break system. > > Am I wrong ? Hmmm... first of all, you know that there are some things you have to take into mind when installing bash into the OS (e. g. attention to use statical linking, and placing it into /bin). Keep in mind that FreeBSD defaults to csh as the default dialog shell in many places (e. g. /usr/share/skel), but you can also modify those references to point to bash instead. I don't know why you want to remove csh from the system (instead of just not using it), but in my opinion - without any experience or testing - it sounds possible. You can easily build a minimal system, install bash as mentioned before, and then remove the csh binary. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
On Fri, Jun 04, 2010 at 08:56:02PM +0200, Stefan Miklosovic wrote: > Hi list, > > title says it, i would like completely remove csh and install bash > instead. As far I know, csh is build in system, could I remove it > manually and install bash (of course, in reverse order :D) If you are made about that, then just change your shell in the /etc/passwd file to /usr/local/bin/bash and you will have bash as your shell. There is no particular reason to do so, but you can if you want. Actually, the csh on FreeBSD is now tcsh and has most of the cute features added that some people think they have to use bash for. Of course, the syntax for commands is still csh style. > > Are there such dependencies on csh? I know that real system scripting > is done via /bin/sh > co absence of csh shell should not break system. You do not want to make bash be the default shell for root. It should be left as /bin/sh jerry > > Am I wrong ? > > Thank you for reply > > Have a nice day > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: bash instead of csh (completely)
Why would you want to do that? On 4 Jun 2010 19:57, "Stefan Miklosovic" wrote: Hi list, title says it, i would like completely remove csh and install bash instead. As far I know, csh is build in system, could I remove it manually and install bash (of course, in reverse order :D) Are there such dependencies on csh? I know that real system scripting is done via /bin/sh co absence of csh shell should not break system. Am I wrong ? Thank you for reply Have a nice day ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
bash instead of csh (completely)
Hi list, title says it, i would like completely remove csh and install bash instead. As far I know, csh is build in system, could I remove it manually and install bash (of course, in reverse order :D) Are there such dependencies on csh? I know that real system scripting is done via /bin/sh co absence of csh shell should not break system. Am I wrong ? Thank you for reply Have a nice day ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"