Re: Bash history empty on login

2013-01-08 Thread Trond Endrestøl
On Tue, 8 Jan 2013 18:49-0500, Andre Goree wrote: > > > I think I've found the culprit, however: > > [agoree@desktop ~]$ echo $HISTFILESIZE > > 1024000 > > [agoree@desktop ~]$ echo $HISTFILE > > /home/agoree/.bash_history > > [agoree@desktop ~]$ ll /home/agoree/.bash_history > > -rw--- 1 ago

Re: Bash history empty on login

2013-01-08 Thread Andre Goree
> I think I've found the culprit, however: > [agoree@desktop ~]$ echo $HISTFILESIZE > 1024000 > [agoree@desktop ~]$ echo $HISTFILE > /home/agoree/.bash_history > [agoree@desktop ~]$ ll /home/agoree/.bash_history > -rw--- 1 agoree agoree12k Jan 5 14:09 /home/agoree/.bash_history > [agore

Re: Bash history empty on login

2013-01-08 Thread Andre Goree
On 01/08/13 09:11, Trond Endrestøl wrote: > On Tue, 8 Jan 2013 09:05-0500, Andre Goree wrote: > >> On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos >> wrote: >> >>> >>> Hope I'm not offending you if the following are things >>> you've tried as a matter-of-course: >>> >>> After booting up, is h

Re: Bash history empty on login

2013-01-08 Thread Trond Endrestøl
On Tue, 8 Jan 2013 09:05-0500, Andre Goree wrote: > On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos > wrote: > > > > > Hope I'm not offending you if the following are things > > you've tried as a matter-of-course: > > > > After booting up, is history started, or do you have to do > > that

Re: Bash history empty on login

2013-01-08 Thread Andre Goree
On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos wrote: Hope I'm not offending you if the following are things you've tried as a matter-of-course: After booting up, is history started, or do you have to do that manually? Have you run "set -o" to see if history is enabled? If it isn't,

Re: Bash history empty on login

2013-01-08 Thread Dimitri Yioulos
On Monday 07 January 2013 7:01:09 pm Andre Goree wrote: > I'm not sure what's going on, as I've never had an issue > like this in my years of using FreeBSD nor Linux. Each > time I login, my history file is empty! I'm not sure > what could be causing this, but below [1] is my .bashrc. > I had ".

Re: bash pipe redirection gets stuck

2012-12-04 Thread jb
rule.lv> writes: > > Dear all, > I stumbled upon a problem where multiple pipe redirection occasionally get > stuck when trying to get sha256 sum of a stream. > > You can try to reproduce the problem if you have /usr/ports/shells/bash > installed (output redirection used in this command is pos

Re: bash pipe redirection gets stuck

2012-12-03 Thread long
> On 03.12.12 15:35, l...@rule.lv wrote: > [...] >> I stumbled upon a problem where multiple pipe redirection occasionally >> get >> stuck when trying to get sha256 sum of a stream. >> >> You can try to reproduce the problem if you have /usr/ports/shells/bash >> installed (output redirection used i

Re: bash pipe redirection gets stuck

2012-12-03 Thread jb
jb gmail.com> writes: > ... > Do you get stuck with this ? Does it make any difference ? I missed a redirector - sorry about that; the entry should be: /usr/local/bin/bash -c 'cat /tmp/file1 | tee /tmp/file1.copy | /sbin/sha256 > \ /tmp/file1.sha256' ; echo $status jb ___

Re: bash pipe redirection gets stuck

2012-12-03 Thread jb
rule.lv> writes: > > Dear all, > I stumbled upon a problem where multiple pipe redirection occasionally get > stuck when trying to get sha256 sum of a stream. > > You can try to reproduce the problem if you have /usr/ports/shells/bash > installed (output redirection used in this command is pos

Re: bash pipe redirection gets stuck

2012-12-03 Thread Frank Reppin
On 03.12.12 15:35, l...@rule.lv wrote: [...] I stumbled upon a problem where multiple pipe redirection occasionally get stuck when trying to get sha256 sum of a stream. You can try to reproduce the problem if you have /usr/ports/shells/bash installed (output redirection used in this command is p

Re: bash pipe redirection gets stuck

2012-12-03 Thread Jerry
On Mon, 3 Dec 2012 16:35:15 +0200 (EET) l...@rule.lv articulated: > Dear all, > I stumbled upon a problem where multiple pipe redirection > occasionally get stuck when trying to get sha256 sum of a stream. > > You can try to reproduce the problem if you > have /usr/ports/shells/bash installed (ou

Re: bash Shell Scripting Question

2012-09-20 Thread Polytropon
On Thu, 20 Sep 2012 11:16:40 +0200, Jan Henrik Sylvester wrote: > On 09/20/2012 04:29, Polytropon wrote: > > Correct. You could use different approaches which may or may > > not fail due to the directory names you will encounter (like > > directories with spaces or special characters). > > > >

Re: bash Shell Scripting Question

2012-09-20 Thread Martin McCormick
Many thanks! The for loop was what was needed. Polytropon writes: > Just a sidenote: If you're not using bash-specific functionality > and intend to make your script portable, use #!/bin/sh instead. I always start out that way for that very reason. I needed some random number functions and arithm

Re: Re: bash Shell Scripting Question

2012-09-20 Thread Jan Henrik Sylvester
On 09/20/2012 04:29, Polytropon wrote: Correct. You could use different approaches which may or may not fail due to the directory names you will encounter (like directories with spaces or special characters). #!/bin/sh for DIR in `ls -LF | grep \/`; do cd ${DIR}

Re: bash Shell Scripting Question

2012-09-19 Thread Polytropon
On Wed, 19 Sep 2012 21:03:11 -0500, Martin McCormick wrote: > I just discovered a knowledge deficiency on my part that > I can't seem to resolve. > > If one writes a loop of the following form: > > #!/usr/local/bin/bash Just a sidenote: If you're not using bash-specific functionalit

Re: bash Shell Scripting Question

2012-09-19 Thread Mihai Donțu
On Wed, 19 Sep 2012 21:03:11 -0500 Martin McCormick wrote: > #!/usr/local/bin/bash > ls -LF |grep \/ >/tmp/files > while read dirname; do > cd $dirname > #Do whatever commands to be repeated in each directory. > done < /tmp/files > How about: ls -LF | grep \/ | while read dirname; do cd $

Re: bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Jerry
On Tue, 31 Jan 2012 12:05:57 -0800 Edward Martinez articulated: > I meant LC_COLLATE being set to en_US.UTF-8 not C. linux and > solaris shows both upper and lowercase when set characters like > [a-cx-y] and others are used. when LC_COLLATE is set to > en_US.UTF-8. I thought it could

Re: bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Edward Martinez
On 01/31/12 06:31, Robert Bonomi wrote: From owner-freebsd-questi...@freebsd.org Tue Jan 31 05:45:47 2012 Date: Tue, 31 Jan 2012 04:45:36 -0800 From: Edward Martinez To: FreeBSD Questions Subject: bash LC_COLLATE or LC_ALL set =?windows-1252?q?=93C=94_not__sort?= =?windows-1252?q?_in_diction

Re: bash LC_COLLATE or LC_ALL set “C” not sort in dictionary order.

2012-01-31 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org Tue Jan 31 05:45:47 2012 > Date: Tue, 31 Jan 2012 04:45:36 -0800 > From: Edward Martinez > To: FreeBSD Questions > Subject: bash LC_COLLATE or LC_ALL set =?windows-1252?q?=93C=94_not__sort?= > =?windows-1252?q?_in_dictionary_order=2E?= > > > > >

Re: bash can not find most of my commands

2011-02-22 Thread Chip Camden
Quoth David Brodbeck on Tuesday, 22 February 2011: > On Tue, Feb 22, 2011 at 12:39 PM, Chad Perrin wrote: > > Just do us all a favor; don't write code in bash. What's with all the bash bashing? Sorry, couldn't resist. > > Yeah, I try to avoid bash-specific syntax unless it's for one-off > scri

Re: bash can not find most of my commands

2011-02-22 Thread Chad Perrin
On Tue, Feb 22, 2011 at 01:10:20PM -0800, David Brodbeck wrote: > > Yeah, I try to avoid bash-specific syntax unless it's for one-off > scripts. csh suffers the same kinds of problems; I only write csh > code under extreme duress, like when forced to maintain the > system-wide csh.login script. ;

Re: bash can not find most of my commands

2011-02-22 Thread David Brodbeck
On Tue, Feb 22, 2011 at 12:39 PM, Chad Perrin wrote: > Just do us all a favor; don't write code in bash. Yeah, I try to avoid bash-specific syntax unless it's for one-off scripts. csh suffers the same kinds of problems; I only write csh code under extreme duress, like when forced to maintain the

Re: bash can not find most of my commands

2011-02-22 Thread Chad Perrin
On Tue, Feb 22, 2011 at 10:07:54AM -0800, David Brodbeck wrote: > On Tue, Feb 22, 2011 at 9:53 AM, Chad Perrin wrote: > > It turns out auto-completion with hinting and command history > searching are pretty addictive if you're used to having them. :) I have auto-completion, and I know my environ

Re: bash can not find most of my commands

2011-02-22 Thread David Brodbeck
On Tue, Feb 22, 2011 at 9:53 AM, Chad Perrin wrote: > Thus, if you *really* want a superuser account with bash as its default > shell, you can always use toor for that purpose.  I don't much see the > point in setting a superuser account to use bash anyway -- or any other > account, really -- but

Re: bash can not find most of my commands

2011-02-22 Thread Chad Perrin
On Tue, Feb 22, 2011 at 05:58:22PM +0100, Alokat wrote: > > Paul has satisfied me. I have changed back to csh. Your system should have a "toor" account as well. It is just a second root account, whose essential purpose is to provide a root account that you can fiddle with to your heart's content

Re: bash can not find most of my commands

2011-02-22 Thread Warren Block
On Tue, 22 Feb 2011, Paul Macdonald wrote: On 22/02/2011 16:40, Alokat wrote: Hi, I have changed my shell from csh to bash ... But after that I have to call "reboot" like /sbin/reboot. How can I change that without changing the shell. :) don't change your root shell! csh is in the base sys

Re: bash can not find most of my commands

2011-02-22 Thread Lars Eighner
On Tue, 22 Feb 2011, Alokat wrote: Paul has satisfied me. I have changed back to csh. If you want to run as root and use bash, well, that is what the user toor is for (examine master.passwd -- use vipw to edit master.passwd to enter a password for toor and the path to bash for toor, but set ED

Re: bash can not find most of my commands

2011-02-22 Thread Jason Helfman
On Tue, Feb 22, 2011 at 12:08:30PM -0500, Randy Ramsdell thus spake: Alokat wrote: On 02/22/11 17:49, Paul Macdonald wrote: On 22/02/2011 16:40, Alokat wrote: Hi, I have changed my shell from csh to bash ... But after that I have to call "reboot" like /sbin/reboot. How can I change that with

Re: bash can not find most of my commands

2011-02-22 Thread Randy Ramsdell
Alokat wrote: On 02/22/11 17:49, Paul Macdonald wrote: On 22/02/2011 16:40, Alokat wrote: Hi, I have changed my shell from csh to bash ... But after that I have to call "reboot" like /sbin/reboot. How can I change that without changing the shell. :) don't change your root shell! csh is in

Re: bash can not find most of my commands

2011-02-22 Thread Alokat
On 02/22/11 17:49, Paul Macdonald wrote: On 22/02/2011 16:40, Alokat wrote: Hi, I have changed my shell from csh to bash ... But after that I have to call "reboot" like /sbin/reboot. How can I change that without changing the shell. :) don't change your root shell! csh is in the base system

Re: bash can not find most of my commands

2011-02-22 Thread Rolf G Nielsen
2011-02-22 17:47, Alokat skrev: On 02/22/11 17:44, Rolf Nielsen wrote: 2011-02-22 17:40, Alokat skrev: Hi, I have changed my shell from csh to bash ... Why? Do you use root as your regular login? But after that I have to call "reboot" like /sbin/reboot. How can I change that without chang

Re: bash can not find most of my commands

2011-02-22 Thread Paul Macdonald
On 22/02/2011 16:40, Alokat wrote: Hi, I have changed my shell from csh to bash ... But after that I have to call "reboot" like /sbin/reboot. How can I change that without changing the shell. :) don't change your root shell! csh is in the base system so is safe and will always* work, bash i

Re: bash can not find most of my commands

2011-02-22 Thread Alokat
On 02/22/11 17:44, Rolf Nielsen wrote: 2011-02-22 17:40, Alokat skrev: Hi, I have changed my shell from csh to bash ... Why? Do you use root as your regular login? But after that I have to call "reboot" like /sbin/reboot. How can I change that without changing the shell. :) my /root/.prof

Re: bash can not find most of my commands

2011-02-22 Thread Rolf Nielsen
2011-02-22 17:40, Alokat skrev: Hi, I have changed my shell from csh to bash ... Why? Do you use root as your regular login? But after that I have to call "reboot" like /sbin/reboot. How can I change that without changing the shell. :) my /root/.profile: PATH=/sbin:/bin:/usr/sbin:/usr/bin

Re: bash increment in a given way

2010-12-11 Thread Charlie Kester
On Sat 11 Dec 2010 at 09:57:08 PST Charlie Kester wrote: On Sat 11 Dec 2010 at 06:34:20 PST S Mathias wrote: It's ok, that i can use this, when i want an incrementing sequence, in a given way: # {START..END..INCREMENT} $ for i in {0..10..2}; do echo "Welcome $i times"; done Welcome 0 times Wel

Re: bash increment in a given way

2010-12-11 Thread Charlie Kester
On Sat 11 Dec 2010 at 06:34:20 PST S Mathias wrote: It's ok, that i can use this, when i want an incrementing sequence, in a given way: # {START..END..INCREMENT} $ for i in {0..10..2}; do echo "Welcome $i times"; done Welcome 0 times Welcome 2 times Welcome 4 times Welcome 6 times Welcome 8 tim

Re: bash increment in a given way

2010-12-11 Thread Samuel Martín Moro
also... if (nwrote: > with seq starting with 0, to fit your example... > > On Sat, Dec 11, 2010 at 5:34 PM, Samuel Martín Moro wrote: > >> something like that? >> for i in `seq 1 20 | awk 'BEGIN{n=0; max=4; avg=max/2}{if (n<=avg) {print >> $0;} n++; if (n>=max) {n=0;} }'` >> do >> echo welcome

Re: bash increment in a given way

2010-12-11 Thread Samuel Martín Moro
with seq starting with 0, to fit your example... On Sat, Dec 11, 2010 at 5:34 PM, Samuel Martín Moro wrote: > something like that? > for i in `seq 1 20 | awk 'BEGIN{n=0; max=4; avg=max/2}{if (n<=avg) {print > $0;} n++; if (n>=max) {n=0;} }'` > do > echo welcome $i times > done > > > > On Sat,

Re: bash increment in a given way

2010-12-11 Thread Samuel Martín Moro
something like that? for i in `seq 1 20 | awk 'BEGIN{n=0; max=4; avg=max/2}{if (n<=avg) {print $0;} n++; if (n>=max) {n=0;} }'` do echo welcome $i times done On Sat, Dec 11, 2010 at 3:34 PM, S Mathias wrote: > , that i can use this, when i want -- Samuel Martín Moro {EPITECH.} tek5 Ca

Re: bash command line - can not type " c" char (not echoed)

2010-12-03 Thread JB
Chris Rees gmail.com> writes: > > Glad you solved it. > > Are you aware that packages and ports are identical once installed? > ... > > ... > > There are packages, no ports on my system. > > Yes, I am. I made a statement that looks incomprehensible -:) JB __

Re: bash command line - can not type "c" char (not echoed)

2010-12-03 Thread Chris Rees
Glad you solved it. Are you aware that packages and ports are identical once installed? Chris Sorry for top-posting, Android won't let me quote, but K-9 can't yet do threading. On 3 Dec 2010 11:35, "JB" wrote: > Hi, > > this happens both in console and gnome xterm. > No problem when c

Re: Bash Script Help - File Names With Spaces -- SOLVED

2010-08-17 Thread Anonymous
Drew Tomlinson writes: > It finally occurred to me that I needed the shell to see a new line as > the delimiter and not whitespace. Then a simple search revealed my > answer: > > O=$IFS > IFS=$(echo -en "\n\b") > > IFS=$O Old IFS value can be preserved by using `local' keyword or (...) braces,

Re: Bash Script Help - File Names With Spaces

2010-08-17 Thread Karl Vogel
>> On Tue, 17 Aug 2010 07:47:25 -0700, >> Drew Tomlinson said: D> Then I attempt to use 'basename' to extract the file name to a variable D> which I can later pass to 'ln'. This seems to work: D> basename "/archive/Multimedia/Audio/Music/Billboard Top USA D> Singles/1980-028 Kenny Loggins -

Re: Bash Script Help - File Names With Spaces

2010-08-17 Thread Timm Wimmers
Am Dienstag, den 17.08.2010, 08:22 -0700 schrieb Chip Camden: > find -E ... | while read i; do; basename $i; done The semicolon behind "do" isn't necessary. -- Timm ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listin

Re: Bash Script Help - File Names With Spaces

2010-08-17 Thread Drew Tomlinson
On 8/17/2010 8:22 AM, Chip Camden wrote: Quoth Drew Tomlinson on Tuesday, 17 August 2010: I have a collection of yearly top 100 Billboard mp3s in this format (all one line - sorry if it wraps): /archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028 Kenny Loggins - This Is It.mp3

Re: Bash Script Help - File Names With Spaces -- SOLVED

2010-08-17 Thread Drew Tomlinson
On 8/17/2010 7:47 AM, Drew Tomlinson wrote: I have a collection of yearly top 100 Billboard mp3s in this format (all one line - sorry if it wraps): /archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028 Kenny Loggins - This Is It.mp3 I want to create symbolic links to the top 30

Re: Bash Script Help - File Names With Spaces

2010-08-17 Thread Chip Camden
Quoth Drew Tomlinson on Tuesday, 17 August 2010: > I have a collection of yearly top 100 Billboard mp3s in this format (all > one line - sorry if it wraps): > > /archive/Multimedia/Audio/Music/Billboard Top USA Singles/1980-028 Kenny > Loggins - This Is It.mp3 > > I want to create symbolic link

Re: Bash logging: two questions

2010-07-21 Thread Anonymous
jimbob palmer writes: > Hello, > > I would like to run a bash script but to log output and exit codes. > Essentially I would like to run the script with bash -x, but for that > output to the log to go to a file, and the normal output as from > running a normal script to go to the terminal. Dunno

Re: bash instead of csh (completely)

2010-06-05 Thread ill...@gmail.com
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?

Re: bash instead of csh (completely)

2010-06-04 Thread Chad Perrin
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 *prog

Re: bash instead of csh (completely)

2010-06-04 Thread b. f.
>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 ..

Re: bash instead of csh (completely)

2010-06-04 Thread C. P. Ghost
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 e

Re: bash instead of csh (completely)

2010-06-04 Thread Stefan Miklosovic
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

Re: bash instead of csh (completely)

2010-06-04 Thread Polytropon
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

Re: bash instead of csh (completely)

2010-06-04 Thread Eric Masson
"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:

Re: bash instead of csh (completely)

2010-06-04 Thread Jerry B. Altzman
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 _

Re: bash instead of csh (completely)

2010-06-04 Thread Michael Powell
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 sys

Re: bash instead of csh (completely)

2010-06-04 Thread Uwe Laverenz
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 shel

Re: bash instead of csh (completely)

2010-06-04 Thread Polytropon
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 depen

Re: bash instead of csh (completely)

2010-06-04 Thread Jerry McAllister
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 ab

Re: bash instead of csh (completely)

2010-06-04 Thread Chris Rees
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

Re: Bash lockups

2010-05-28 Thread Carl Johnson
Giorgos Keramidas writes: > On Fri, 21 May 2010 09:30:05 -0700, Carl Johnson wrote: >> Giorgos Keramidas writes: >>> Does this lock-up happen if you leave the shell 'idle' for too long >>> over an ssh session? There may be problems with stateful connection >>> tracking between your terminal an

Re: Bash lockups

2010-05-21 Thread Carl Johnson
Giorgos Keramidas writes: > On Fri, 21 May 2010 09:30:05 -0700, Carl Johnson wrote: >> Giorgos Keramidas writes: >>> Does this lock-up happen if you leave the shell 'idle' for too long >>> over an ssh session? There may be problems with stateful connection >>> tracking between your terminal an

Re: Bash lockups

2010-05-21 Thread Giorgos Keramidas
On Fri, 21 May 2010 09:30:05 -0700, Carl Johnson wrote: > Giorgos Keramidas writes: >> Does this lock-up happen if you leave the shell 'idle' for too long >> over an ssh session? There may be problems with stateful connection >> tracking between your terminal and the remote shell :-/ > > No, I d

Re: Bash lockups

2010-05-21 Thread Carl Johnson
Giorgos Keramidas writes: > On Wed, 19 May 2010 16:14:52 -0700, Carl Johnson wrote: >> I have been experimenting with FreeBSD for a while, and I consistently >> get bash lockups at irregular intervals when it is otherwise idle. By >> lockup, I mean that it stops responding to the keyboard and u

Re: Bash lockups

2010-05-20 Thread Giorgos Keramidas
On Wed, 19 May 2010 16:14:52 -0700, Carl Johnson wrote: > I have been experimenting with FreeBSD for a while, and I consistently > get bash lockups at irregular intervals when it is otherwise idle. By > lockup, I mean that it stops responding to the keyboard and uses 100% > CPU. It will sometime

Re: Bash lockups

2010-05-20 Thread Carl Johnson
vogelke+u...@pobox.com (Karl Vogel) writes: >>> On Wed, 19 May 2010 16:14:52 -0700, >>> Carl Johnson said: > > C> I have been experimenting with FreeBSD for a while, and I consistently > C> get bash lockups at irregular intervals when it is otherwise idle. > C> Does anybody have any suggestings

Re: Bash lockups

2010-05-20 Thread Karl Vogel
>> On Wed, 19 May 2010 16:14:52 -0700, >> Carl Johnson said: C> I have been experimenting with FreeBSD for a while, and I consistently C> get bash lockups at irregular intervals when it is otherwise idle. C> Does anybody have any suggestings on how I could try to trace this? 1. Get a proces

RE: bash while read question

2010-05-05 Thread Evuraan
2010/5/5 CyberLeo Kitsana : > On 05/05/2010 08:25 PM, Evuraan wrote: >> I cant figure out why the variable in in loop2 does not hike to +1? >> (its a friday, i am dazed, I admit. but this should not be a mystery!) >> any help would be much appreciated. >> >> $ cat loop2 >> #! /bin/bash >> >> date

Re: bash while read question

2010-05-05 Thread CyberLeo Kitsana
On 05/05/2010 08:25 PM, Evuraan wrote: > I cant figure out why the variable in in loop2 does not hike to +1? > (its a friday, i am dazed, I admit. but this should not be a mystery!) > any help would be much appreciated. > > $ cat loop2 > #! /bin/bash > > date > /tmp/somefile > b="1" > cat /tmp/so

Re: bash script question

2009-12-01 Thread Gary Kline
On Tue, Dec 01, 2009 at 11:10:33PM +0100, Polytropon wrote: > On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline wrote: > > Hi guys, > > > > Here's a bash-related question, kind-of. Is there any way to > > automagically run my .csrhc thru a script and wind up with a > > bash script?

Re: bash script question

2009-12-01 Thread Gary Kline
On Tue, Dec 01, 2009 at 11:02:07PM +0100, Rolf G Nielsen wrote: > Gary Kline wrote: > >On Tue, Dec 01, 2009 at 10:42:10PM +0100, Polytropon wrote: > >>On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen > >> wrote: > >>>Why are you using bash? To make a shell script as portable as possible, > >>>u

Re: bash script question

2009-12-01 Thread Polytropon
On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline wrote: > Hi guys, > > Here's a bash-related question, kind-of. Is there any way to > automagically run my .csrhc thru a script and wind up with a > bash script? csh and (ba)sh use dufferent syntax and variable names. But you

Re: bash script question

2009-12-01 Thread Rolf G Nielsen
Gary Kline wrote: On Tue, Dec 01, 2009 at 10:42:10PM +0100, Polytropon wrote: On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen wrote: Why are you using bash? To make a shell script as portable as possible, use /bin/sh. Bash is a third party shell, that isn't included in a base installation

Re: bash script question

2009-12-01 Thread Gary Kline
On Tue, Dec 01, 2009 at 10:42:10PM +0100, Polytropon wrote: > On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen > wrote: > > Why are you using bash? To make a shell script as portable as possible, > > use /bin/sh. Bash is a third party shell, that isn't included in a base > > installation (you

Re: bash script question

2009-12-01 Thread Polytropon
On Tue, 01 Dec 2009 21:06:34 +0100, Rolf G Nielsen wrote: > Why are you using bash? To make a shell script as portable as possible, > use /bin/sh. Bash is a third party shell, that isn't included in a base > installation (you're not using bash as root's shell, are you?). By using > /bin/sh, yo

Re: bash script question

2009-12-01 Thread Rolf G Nielsen
Dánielisz László wrote: I just find out: #!/usr/local/bin/bash export IFS=" " cuc=$* mkdir "cuc" Thanks anyway! László From: Dánielisz László To: freebsd-questions@freebsd.org Sent: Tue, December 1, 2009 8:37:04 PM Subject: bash script question Hello, I'

Re: bash script question

2009-12-01 Thread Polytropon
On Tue, 1 Dec 2009 11:48:43 -0800 (PST), Dánielisz László wrote: > I just find out: > > #!/usr/local/bin/bash > export IFS=" " > cuc=$* > mkdir "cuc" The $* variable will expand to all arguments given on the command line, e. g. $ ./myscript foo bar baz will result in mkdir "f

Re: bash script question

2009-12-01 Thread Dánielisz László
I just find out: #!/usr/local/bin/bash export IFS=" " cuc=$* mkdir "cuc" Thanks anyway! László From: Dánielisz László To: freebsd-questions@freebsd.org Sent: Tue, December 1, 2009 8:37:04 PM Subject: bash script question Hello, I'd like to ask how can I re

Re: bash prompt update lagging

2009-11-17 Thread Michael P. Soulier
On 16/11/09 Polytropon said: > Your PS1 seems to include ${SHORT_PWD}, a variable. It seems > that it is not updated immediately after the cd command. Yeah, looks like it. Works on linux though... > By the way, this is bash-3.2.25 on FreeBSD/x86 7. bash-4.0.33_2 on x86 6.3. > Is this what you'

Re: bash prompt update lagging

2009-11-15 Thread Polytropon
On Sun, 15 Nov 2009 18:14:25 -0500, "Michael P. Soulier" wrote: > \[\033[1;32m\]\[\033[0;36m\]\u\[\033[1;32...@\[\033[0;36m\]\h\[\033[1;32m\]:\[\033[0;37m\]${SHORT_PWD}\[\033[1;32m\]$\[\033[0;37m\] > I'm wondering if this is a bash bug on bsd, or if I'm doing something wrong. Your PS1 seems

Re: Bash and arrays

2009-07-15 Thread Jay Hall
On Jul 15, 2009, at 12:53 AM, Dan Nelson wrote: In the last episode (Jul 15), Bryan Venteicher said: I thought I understood how arrays work in bash, but I have been proven wrong. I am reading lines from a file and placing them in an array. However, when I am finished, the array has a length

Re: Bash and arrays

2009-07-14 Thread Dan Nelson
In the last episode (Jul 15), Bryan Venteicher said: > > I thought I understood how arrays work in bash, but I have been proven > > wrong. I am reading lines from a file and placing them in an array. > > However, when I am finished, the array has a length of 0. > > > > Following is the code I am

Re: Bash and arrays

2009-07-14 Thread Bryan Venteicher
- Jay Hall wrote: > Ladies and Gentlemen, > > I thought I understood how arrays work in bash, but I have been proven > wrong. I am reading lines from a file and placing them in an array. > However, when I am finished, the array has a length of 0. > > Following is the code I am using.

Re: bash suddenly doesn't like $() syntax

2009-03-23 Thread Michael P. Soulier
On Mon, Mar 23, 2009 at 9:19 AM, Michael P. Soulier wrote: > Ok, that's what I have. I'm rebuilding it now. And, confirmed. The rebuilt bash is fine now. Thanks, Mike -- Michael P. Soulier "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot o

Re: bash suddenly doesn't like $() syntax

2009-03-23 Thread Michael P. Soulier
On Sat, Mar 21, 2009 at 10:20 AM, Lowell Gilbert wrote: > Since the update to bash 4.0, the port needs to be built with bison > instead of the system yacc.  The port has been updated to do this; make > sure you have version 1.111 of the port's Makefile. Ok, that's what I have. I'm rebuilding it n

Re: bash suddenly doesn't like $() syntax

2009-03-21 Thread Lowell Gilbert
Chuck Robey writes: > I've had stuff like this happen to me, once in a while. it's NEVER a fact of > bash really suddenly losing something so major. What you have to is to look > at > previous parts of your code, for things like unclosed parens, unclosed quotes, > things like that. The errors

Re: bash suddenly doesn't like $() syntax

2009-03-21 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lowell Gilbert wrote: Oh, crap, I flubbed it about the bash error. It's SO often something claimed by folks, I knee-jerked that it had to be a previous line in error. Sorry. > "Daniel Bye" writes: > >> On Sat, Mar 21, 2009 at 08:49:01AM -0400, Mic

Re: bash suddenly doesn't like $() syntax

2009-03-21 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lowell Gilbert wrote: > "Daniel Bye" writes: > >> On Sat, Mar 21, 2009 at 08:49:01AM -0400, Michael P. Soulier wrote: >>> Hello, >>> >>> I'm running the shells/bash port on 6.3, and I recently ran a portupgrade. >>> All >>> of a sudden when I login,

Re: bash suddenly doesn't like $() syntax

2009-03-21 Thread Lowell Gilbert
"Daniel Bye" writes: > On Sat, Mar 21, 2009 at 08:49:01AM -0400, Michael P. Soulier wrote: >> Hello, >> >> I'm running the shells/bash port on 6.3, and I recently ran a portupgrade. >> All >> of a sudden when I login, my standard .profile and .bashrc are causing a >> bunch >> of error messages

Re: bash suddenly doesn't like $() syntax

2009-03-21 Thread Daniel Bye
On Sat, Mar 21, 2009 at 08:49:01AM -0400, Michael P. Soulier wrote: > Hello, > > I'm running the shells/bash port on 6.3, and I recently ran a portupgrade. All > of a sudden when I login, my standard .profile and .bashrc are causing a bunch > of error messages, like so > > -bash: command substitu

Re: bash suddenly doesn't like $() syntax

2009-03-21 Thread Lowell Gilbert
"Michael P. Soulier" writes: > I'm running the shells/bash port on 6.3, and I recently ran a portupgrade. All > of a sudden when I login, my standard .profile and .bashrc are causing a bunch > of error messages, like so > > -bash: command substitution: line 39: syntax error near unexpected token

Re: bash versus sh test builtin

2009-01-12 Thread Karl Vogel
>> On Sun, 11 Jan 2009 20:08:18 -0600, >> Jeffrey Goldberg said: J> if [ $UID -ne 0 ] ; then ... J> Does anyone have a recommendation of how to run this simple test in /bin/sh J> and how to write tests reasonably portably? I think your best bet for comparisons like this is to use case. I st

Re: bash versus sh test builtin

2009-01-11 Thread George Davidovich
On Sun, Jan 11, 2009 at 08:08:18PM -0600, Jeffrey Goldberg wrote: > The -ne operator for [ in /bin/sh doesn't seem to work as in bash. > Also the bash behavior here is what matches /bin/[ most closely. > > $ /bin/sh > $ if [ $UID -ne 0 ] ; then > > echo not root > > fi > [: -ne: unexpected op

Re: bash versus sh test builtin

2009-01-11 Thread Jeffrey Goldberg
On Jan 11, 2009, at 9:07 PM, Dan Nelson wrote: UID=$(id -u) if [ $UID -ne 0 ] ; then echo not root fi UID is not a variable set by /bin/sh, which is why the test fails. Ah. Thank you. I was, as you see, barking up the wrong tree. Thank you for setting me strait on this. Cheers, -j __

Re: bash versus sh test builtin

2009-01-11 Thread Dan Nelson
In the last episode (Jan 11), Jeffrey Goldberg said: > The -ne operator for [ in /bin/sh doesn't seem to work as in bash. > Also the bash behavior here is what matches /bin/[ most closely. > > $ /bin/sh > $ if [ $UID -ne 0 ] ; then > > echo not root > > fi > [: -ne: unexpected operator > $ ex

Re: bash script on FreeBSD

2008-10-08 Thread Paul Schmehl
--On Wednesday, October 08, 2008 14:16:02 -0500 Giorgos Keramidas <[EMAIL PROTECTED]> wrote: On Wed, 08 Oct 2008 12:11:40 +0700, Kalpin Erlangga Silaen <[EMAIL PROTECTED]> wrote: Dear all, I am going to extract field username and UID from /etc/passwd and passed into some scripts. Let say I

Re: bash script on FreeBSD

2008-10-08 Thread Giorgos Keramidas
On Wed, 08 Oct 2008 12:11:40 +0700, Kalpin Erlangga Silaen <[EMAIL PROTECTED]> wrote: > Dear all, > > I am going to extract field username and UID from /etc/passwd and > passed into some scripts. Let say I got line > > admin 100 > admin2 200 > admin3 300 > admin4 400 > > and then I want to echoin

Re: bash script on FreeBSD

2008-10-08 Thread Kalpin Erlangga Silaen
Dear Frank, you are correct. Finally, I write my script using awk. Thank you Kalpin Erlangga Silaen Frank Shute wrote: On Wed, Oct 08, 2008 at 08:11:56AM +0100, Frank Shute wrote: On Wed, Oct 08, 2008 at 12:11:40PM +0700, Kalpin Erlangga Silaen wrote: Dear all, I am going to extract

  1   2   3   >