Re: PATH value doesn't get updated

2008-05-12 Thread Bob Proulx
re you would need to log in after having made that change in order for bash to read the file and the effect to be seen. Did you log in after having made that change? Was bash invoked as an interactive login shell so that it would read that file? echo $0 echo $- Bob

Re: PATH value doesn't get updated

2008-05-12 Thread Bob Proulx
Carl Wenrich wrote: > Bob Proulx wrote: > > Did you log in after having made that change? Was bash invoked as > > an interactive login shell so that it would read that file? > > > > echo $0 > > echo $- > > Yes. I (1) made the change to .bash_profile, th

Re: PATH value doesn't get updated

2008-05-12 Thread Bob Proulx
rrors to /dev/null effectively ignoring them. Other systems will be similarly different. In any case I believe you have an answer to your question about why your ~/.bash_profile wasn't being sourced. It wasn't being sourced because your shell isn't invoked as a login shell and therefore shouldn't source it. Good luck! Bob

Re: PATH value doesn't get updated

2008-05-13 Thread Bob Proulx
s is off topic for the bash list. If you have further problems the Ubuntu user mailing list would probably be your best place for more help about how to configure your Ubuntu system. If you contact me offlist I would continue to help you if you have problems with setting up an ~/.xsession file. Bob

Re: what matched in a case statement

2008-05-14 Thread Bob Proulx
; echo $CASEMATCH two > ;; > esac Perhaps matching again? foo="lawlesspoets" case $foo in *poets) echo ${foo/*poets/one} echo ${foo%poets} one ;; lawless*) echo ${foo/lawless*/two} echo ${foo#lawless} two ;; esac Bob

Re: PATH value doesn't get updated

2008-05-18 Thread Bob Proulx
Peter Volkov wrote: > Bob Proulx пишет: > > The $0 is the name used to invoke the shell. If it starts with a '-' > > then this is used to instruct the shell that it is a login shell. The > > second variable $- is the flags set to the shell. The 'i

Re: bash 3.2.0 broken ???

2008-05-21 Thread Bob Proulx
n that would be a bug. It would then need to be stated in a way that others may reproduce the bug in order to fix it. Bob

Re: Add a new internal command to BASH

2008-05-22 Thread Bob Proulx
desire. But in order to get help from other people you would need to motivate them as to why you are one of the 0.01% of the people who would need to do this. What are you trying to do that causes you to want to create new built in commands? Bob

Re: Re: A wonderful idea about shell!

2008-05-27 Thread Bob Proulx
(C-o) Accept the current line for execution and fetch the next line relative to the current line from the history for editing. Bob

Re: tailing a file on another server using ssh and...

2008-06-18 Thread Bob Proulx
output That will use ssh without reading stdin to the remote host machine and on the remote host will execute tail of the there file and the stdout will be appended to output on the local filesystem. Note that the appending of the output seems suspicious to me. This will duplicate the lines if the command is run multiple times. Bob

Re: "[EMAIL PROTECTED]" strings in the web archive

2008-07-18 Thread Bob Proulx
read.gmane.org/gmane.comp.shells.bash.bugs/11566 Gmane seems to be one of the better web based mailing list and newgroup readers out there. Bob [1] For example Nabble apparently allows senders to edit their draft and send a message multiple times with the same message-id! So we get several m

Re: setuid from shellscript isn't permanent

2008-07-19 Thread Bob Proulx
hat there is another one that you are not expecting that is running. Bob

Re: set -x output of test operator is irretating

2008-07-31 Thread Bob Proulx
s > quoted appropriately. Of course that makes sense for the "==" and "!=" cases. But is that true even for the "=" case? For the "=" case I thought it was "STRING1 = STRING2" and not "STRING = PATTERN". Could you clarify the rules and educate us? Thanks Bob

Re: set -x output of test operator is irretating

2008-08-02 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > >Of course that makes sense for the "==" and "!=" cases. But is that > >true even for the "=" case? For the "=" case I thought it was > >"STRING1 = STRING2" and not "STRING

Re: 'read' primitive

2008-08-21 Thread Bob Proulx
Again the key part of the manual says: If no names are supplied, the line read is assigned to the variable REPLY. Bob

Re: how do I write a shell script to batch rename files in a directory?

2008-08-29 Thread Bob Proulx
is the resultant list. If parameter is an array variable subscripted with @ or *, the pattern removal operation is applied to each member of the array in turn, and the expansion is the resultant list. Bob

Re: File renaming using SED in BASH

2008-09-21 Thread Bob Proulx
= line is incorrect syntax. See the bash manual section on command substitution. > I get: > bash: 001: command not found Because in your version the variable chg is set to "echo" as an environment variable for the $f command and $f is 001, 002, etc. Try this: for f in *; do chg=$(echo "$f" |sed 's: *(www.somewhere.net)::') mv "$f" "$chg" done Bob

Re: Bash RFE: Goto (especially for jumping while debugging)

2008-09-22 Thread Bob Proulx
just a comment section this doesn't seem to be a compelling need. For that you would need to show how writing state-machines or something is so much easier or some such... Since there are other possibilities I would vote to maintain the status quo. Bob

Re: Bash RFE: Goto (especially for jumping while debugging)

2008-09-22 Thread Bob Proulx
Richard Neill wrote: > Bob Proulx wrote: > >In the future please start a new message for a new thread of > >discussion. When you reply to old messages from three months ago > >those of us who actually keep months worth of email see the message > >threaded with th

Re: Declaring a local variable circumvents "-e"

2008-09-24 Thread Bob Proulx
ect its exit status. > This is how all builtins that affect variable attributes (declare/typeset, > export, readonly) should behave. Note that this is also the way "export" works too. Bob

Re: piping output is delayed

2008-09-27 Thread Bob Proulx
isn't ok > for this application. Sorry but the description is too vague. Can you reduce this to a simple few lines and show it to us? Bob

Re: Problem: extracting substring

2008-10-01 Thread Bob Proulx
o "$x" | sed 's/.*_b\([0-9][0-9]*[.][0-9][0-9]*\).*/\1/') echo "$b" 3.45 But it certainly seems reasonable to use the bash parameter expansion methods to do something similar. $ echo ${x%%ms*} mq001234 But my brain doesn't think that way and so I didn't work up a full procedure. Bob

Re: feature request: "wait --free-slot" for poor man's parallelization

2008-10-04 Thread Bob Proulx
27;t see it. I guess it could > poll the current children with ps, but that seems kind of ugly. I have written such a thing in Perl and am aware of the issues. I am sure something like it could be useful to many people in bash too if you decided to write it and contribute it. Bob

Re: "wait" bug, now or ever?

2008-10-11 Thread Bob Proulx
confident this guess is very likely. I much prefer it when people's superstitions are restricted to avoiding walking under ladders or wearing a certain same pair of socks on game days. Those things don't adversely affect the code they leave behind. :-) > (I also plan to corner him on the exact circumstances of this bug, but > wanted to explore this avenue in parallel.) Good luck! Bob

Re: UPDATE MANAGER pack failure

2008-10-13 Thread Bob Proulx
r las listas de paquetes o el archivo de > estado.' Since you are using Ubuntu then the Ubuntu users mailing lists would be a better source of information. http://www.ubuntu.com/support/communitysupport http://www.ubuntu.com/support/community/mailinglists Bob

Re: [severe] access outside simlinked directory

2008-11-26 Thread Bob Proulx
link to `/usr/local/sys' then: $ cd /usr/sys; echo $PWD /usr/sys $ cd ..; pwd /usr If `set -P' is on, then: $ cd /usr/sys; echo $PWD /usr/local/sys $ cd ..; pwd /usr/local Try setting either 'set -o physical' or equivalently 'set -P' in your $HOME/.bashrc file and you will always follow the physical path. Hope this helps, Bob

Re: command not found on remote server

2008-12-11 Thread Bob Proulx
am EOF Use "EOF" instead if you want $variables to be expanded locally in the script but then you need to be aware of the local expansion and quote any that you don't want expanded. Also, using full paths is frowned upon. Bob

Re: SIGPIPE not properly reset with 'trap - PIPE'

2008-12-11 Thread Bob Proulx
> I've tracked it down. > mingetty exec's /bin/login, which calls pam stuff, which in turn uses > libdbus. And that is the culprit: > > ./dbus/dbus-sysdeps-unix.c-_dbus_disable_sigpipe (void) > ./dbus/dbus-sysdeps-unix.c-{ > ./dbus/dbus-sysdeps-unix.c: signal (SIGPIPE, SIG_IGN); > ./dbus/dbus-sysdeps-unix.c-} Bob

Re: command not found on remote server

2008-12-11 Thread Bob Proulx
Paul Jarc wrote: > Bob Proulx wrote: > > Also, using full paths is frowned upon. > > You mean invoking /directory/some-command directly instead of > PATH=$PATH:/directory > some-command > ? Yes. That is what I am saying. > It depends on the situation. I can'

Re: Can't execute file from command line

2009-01-03 Thread Bob Proulx
ns and other shells didn't used to report the error this way and would often confuse people. Therefore if this is the problem ("if" because I could guess completely wrong here) then I think it indicates that you are using an older version of bash. Bob

Re: Can't execute file from command line

2009-01-04 Thread Bob Proulx
programfile' to the debug testing route in the future then to catch that case. Glad to hear you solved your problem. Bob

Re: ${parameter+word} not documented in bash.info or bash(1)

2009-01-09 Thread Bob Proulx
ting the colon (':') results in a test only for a parameter that is unset. Then searches on ":" would also find that descriptive text too. Bob

Re: execution hook

2009-01-12 Thread Bob Proulx
executed: if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi but the value of the PATH variable is not used to search for the file name. Bob

Re: execution hook

2009-01-13 Thread Bob Proulx
eneville_ wrote: > Bob Proulx wrote: > > Look at the documentation for BASH_ENV in the bash manual. > > Thanks. But this isn't having the effect that I wished for. > > What I'm hoping to achieve is to have bash run something like a wrapper > around each

Re: dabbrev-expand behavior

2009-01-20 Thread Bob Proulx
confused with the original behavior. Let me add my voice to the request to name it something different to avoid the confusion. That would leave the door open in the future for a true emacs compatible dabbrev-expand implementation when operating in emacs mode. Thanks Bob

Re: test fields in bash

2009-01-26 Thread Bob Proulx
& $field3 = 45 ]]; then field4=$(($field4 - 5)); fi echo $field1 $field2 $field3 $field4 done There are endless variations but this matched your description fairly closely. Bob

Re: ssh: redirect the output.

2009-01-27 Thread Bob Proulx
garp28 wrote: > ssh -T ${SRI} < su - simrun -c "/tmp/stop_sri.sh" > EOF > > I would like to redirect the output of the stop_sri.sh into a local log. > How can I do that? Use '>' to redirect the outout. For example: ssh -T ${SRI} >stop_sri.log <

Re: Question about redirecting output of spawned processes

2009-02-12 Thread Bob Proulx
is to add an eval. $ eval echo hello $x And similarly for your case: eval ${commands[ran]} & This will process redirections, expand variables, then run the eval which will do it all again and on the second pass handle the newly appearing redirections that results from the previous variable expansion. Bob

Re: Possibly Off Topic Rant

2009-03-02 Thread Bob Proulx
#Opening-the-software-toolbox The above is also in the coreutils info documentation. info coreutils 'Toolbox Introduction' Bob P.S. The best place for GNU coreutils specific discussions is on the bug-coreutils mailing list.

Re: 2 regressions related to PROMPT_COMMAND

2009-03-02 Thread Bob Proulx
have the same effect. > > I actually had some useful code including parameter expansions > > going on in my PROMPT_COMMAND. So the fact that it is mostly a noop accomplishes the effect Ian was needing in order to produce a small bug case. Perhaps he could have used $(:) instead to make it more obvious? (shrug) Bob

Re: order of redirections

2009-03-02 Thread Bob Proulx
hell holds the file descriptors in program variables. These variables are assigned in the order seen on the command line from left to right. The following pseudo code isn't from the actual shell code but perhaps thinking of it this way will help model it for you. ">FILE 2>&1" # Redirects both stdout and stderr to FILE. 1>FILE # fd[1] = open_for_reading(FILE) 2>&1# fd[2] = fd[1] "2>&1 >FILE" # Redirects stderr. Redirects stdout to file. 2>&1# fd[2] = fd[1] 1>FILE # fd[1] = open_for_reading(FILE) In the second case it should now be apparent that the stderr isn't associated with FILE because of the ordering. Bob

Re: Install Bashdb and Bash not as root

2009-03-04 Thread Bob Proulx
PATH=$HOME/bin:$PATH SHELL=$HOME/bin/bash exec $SHELL Remember that exec overlays the current process replacing it with the new process. Nothing in the same file after the exec will be run. It exits the current file at that point. Bob

Re: Install Bashdb and Bash not as root

2009-03-04 Thread Bob Proulx
e bashdb.el file and read it. There should be comments at the top that inform how to use it. Bob

Re: Install Bashdb and Bash not as root

2009-03-05 Thread Bob Proulx
ficient then you would need to write it out in long form. SHELL="/first/path/to/check/for/bash-3.2.48/bin/bash" if [ -x "$SHELL" ]; then exec "$SHELL" else SHELL="/some/other/path/to/bash-3.2.48/bin/bash" if [ -x "$SHELL" ]; then exec "$SHELL" fi fi echo "Unable to exec my custom shell." Bob

Re: "cannot execute binary file"

2009-03-05 Thread Bob Proulx
devoted to shell programming. Bob

Re: Feature Idea: Enhanced Tab Completion

2009-03-21 Thread Bob Proulx
f mail going through lists.gnu.org but since I am one of the mailing list moderators I am biased. :-) This beat out this next posting 15m19s later which went through without delay at 21 Mar 2009 13:38:08 -0600 because it was a known address. Bob

Re: cat.sh issue

2009-03-25 Thread Bob Proulx
came on the scene with defined behavior. So you are doing well to have used printf in your solution. Bob

Re: Question

2009-04-03 Thread Bob Proulx
is not under the control of traceroute (and certainly has nothing to do with bash) and is totally under the control of the networking provided either by your ISP or by network providers contracted by your ISP. If you have questions concerning your network routing then you need to talk with your ISP. Bob

Re: bash does not read startup scripts on some machines

2009-04-25 Thread Bob Proulx
one on the remote machine and it would operate in a standard environment. But you didn't give an example of what you were wanting so I can't guess if you were trying to set PATH or desiring an alias or function to exist or what. So I realize that this answer will be unsatisfying in that regard. Hope this helps, Bob

addr...@hidden (Re: indirection as an lvalue)

2009-04-25 Thread Bob Proulx
lists.gnu.org munges what it thinks are email addresses in order to prevent harvesting by spammers. You might find this representation of that message more readable. http://thread.gmane.org/gmane.comp.shells.bash.bugs/1728/focus=1729 Bob

Re: simple Translation

2009-05-26 Thread Bob Proulx
s not work. More general than aliases I think shell functions work best. Something like this following: n() { nedit "$@" & } Bob

Re: bashbug chooses wrong $EDITOR executable

2009-06-16 Thread Bob Proulx
okay to leave PATH alone to me. Why set it at all? I don't see the security issue that you are concerned about. Could you educate me? Bob

Re: Possible Bug in BASH

2009-06-20 Thread Bob Proulx
that case. It is only replaced when it is the first word. Using aliases in this way seems really warped to me. I would avoid it for the clarity of code. Aliases are really an old paradigm from csh days. Functions in more modern shells completely replace the need for aliases. Bob

Re: bashbug chooses wrong $EDITOR executable

2009-06-20 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > > It seems okay to leave PATH alone to me. Why set it at all? > > > > I don't see the security issue that you are concerned about. Could > > you educate me? > > I suppose it's not a large security hole if $

Re: feature request: more complete set -e

2009-06-29 Thread Bob Proulx
#x27; and grep collisions. grep PATTERN FILE1 > FILE2 Which is why I like to use sed for this instead. Then the exit code reflects errors and not pattern matches and can be more easily used to handle errors such as a full disk. sed -n '/PATTERN/p' FILE1 > FILE2 || exit 1 Bob

Re: Colored prompt length is not correctly computed - UTF-8

2009-07-04 Thread Bob Proulx
need to check. Even if it isn't available (yet) due to the dependencies you could use it as the basis of a backport to Lenny. Bob

Re: Problem with a "for"

2009-07-07 Thread Bob Proulx
mplest and best way to do this. > for i in ${IPS} > do > nmap -p 22 {IPS} > done Again using echo here is very useful. $ for i in ${IPS} > do > echo nmap -p 22 {IPS} > done nmap -p 22 {IPS} You didn't have a dollar sign there. But actually you wanted to say $i instead. Hope this helps, Bob

Re: Help with script - doesn't work properly from cron

2009-07-20 Thread Bob Proulx
crontab. The 'savelog' command with -c7 will save seven days of datestamped backups (sufficient for my case) without further code. That could easily be -c30 to save 30 days worth. The 'savelog' command pretty much handles all of your issues with datestamping and cycling files very easily. 30 3 * * * root umask 077 ; mysqldump --defaults-file=/etc/mysql/debian.cnf --all-databases | gzip > /var/backups/mysql.dump ; savelog -q -d -l -C -c7 /var/backups/mysql.dump Bob

Re: Errors when patching bash4.0

2009-07-22 Thread Bob Proulx
would think that would be the place to start to look for problems. Bob

Re: Prompt length calculation fails when UTF-8 is used within \[ \]

2009-07-22 Thread Bob Proulx
9-07/msg00107.html Perhaps you are having a similar problem. Double check the signatures of the files and ensure that your downloaded patches aren't corrupted and then I am sure that they can be applied. Bob

Re: bash: echoing octal, disagreement between man page and behaviour

2009-07-26 Thread Bob Proulx
e eight-bit character whose value is the octal value nnn (one to three digits) However on that same system this is the behavior: $ echo -e "\173" \173 $ echo -e "\0173" { I think this was simply a documentation bug that has subsequently been addressed. Bob

Re: HTML Form Script?

2009-07-28 Thread Bob Proulx
hen the script doesn't open the next page. The script simply prints out the html that the user will see next. Or the script print out a redirect to send the browser to a different page. Good luck! Bob

Re: Inconsistent output in terminal emulator

2009-08-22 Thread Bob Proulx
bash is operating in one mode or the other, and > how I can explicitly set this behavior one way or the other? Try invoking bash with the -i option forcing interactive behavior. Does this change anything? Bob

Re: doing simple math in bash :: prb with leading zero

2009-09-01 Thread Bob Proulx
but does not include eight or nine. Please look at the Bash FAQ item E8. http://www.faqs.org/faqs/unix-faq/shell/bash/ Bob

Re: ulimit and ssh?

2009-09-02 Thread Bob Proulx
et "ulimit -a" but to get "ulimit" "-a" instead. You are seeing the output of "ulimit". Try this: ssh localhost "bash -c 'ulimit -a'" And this: echo ulimit -a | ssh localhost bash Bob

Re: ulimit and ssh?

2009-09-02 Thread Bob Proulx
oblem. > > ssh localhost "bash -c 'ulimit -a'" I should have added the -n option to ssh so that it wouldn't read from stdin. In the above if used in a script it will read and consume any input that may have been expected for a different command. ssh -n localhost "bash -c 'ulimit -a'" Bob

Re: ulimit and ssh?

2009-10-05 Thread Bob Proulx
peter360 wrote: > Thanks Adreas. That was what I suspected in my reply to Bob. But Bob > disagreed. Looks like there were some confusion about this feature even > among experts. Seems another reason to deprecate the feature. I don't think anything I said disagreed with what And

Re: ignoring comments in a 'cat' call

2009-10-08 Thread Bob Proulx
ams) aptitude install unison grass And then if you are sure it is creating the right command for you then you can invoke it without the 'echo' and run it for effect. $ sudo aptitude install $(sed 's/#.*//' programs) Reading package lists... Done ... (Of course on my systems I spell 'aptitude' as 'apt-get'. But that is a topic for a different mailing list. :-) Bob

Re: ignoring comments in a 'cat' call

2009-10-09 Thread Bob Proulx
Marc Herbert wrote: > Bob Proulx a écrit : > > > Note that if 'cat' didn't exactly reproduce the contents of input on > > > the output I would consider that a grave bug. > > Well... GNU cat has a number of options, and almost every single one is &

Re: "Sed" Question

2009-10-14 Thread Bob Proulx
Pierre Gaston wrote: > Please consider asking in a sed mailing list like: > http://sed.sourceforge.net/#mailing > or maybe in the usenet group comp.unix.shell I would think help-gnu-ut...@gnu.org would be the better place to ask for help about GNU utilities. :-) Bob

Re: "Sed" Question

2009-10-14 Thread Bob Proulx
Greg Wooledge wrote: > Bob Proulx wrote: > > I would think help-gnu-ut...@gnu.org would be the better place to ask > > for help about GNU utilities. :-) > > We don't know that he's using GNU sed. True, we don't know for sure. But I think it likely that it

bug-bash@gnu.org

2009-10-19 Thread Bob Proulx
st argument. Most of the time that you are doing something like 'edit filename.c &' then you can use the still quite convenient M-C-y to paste in the filename as the first argument to the next command. Bob

Re: cp command will copy to subdirectory without appending /

2009-10-19 Thread Bob Proulx
This usage will remove the ambiguity of the command between the copy > function and the rename function. Please rephrase your question and send it to bug-coreut...@gnu.org. Thanks Bob

bug-bash@gnu.org

2009-10-20 Thread Bob Proulx
essed up; probably because I have > a very complex bash prompt with colors and all...) You have probably tripped into bash FAQ number E3. Easy to fix. Bob

Re: Bash source repository

2009-11-02 Thread Bob Proulx
ented. http://git.savannah.gnu.org/cgit/bash.git But only at the major release points. No patches have been applied. But the available history seems to all be there. Bob

Re: value too great for base (error token is "0008")

2009-11-03 Thread Bob Proulx
cimal number the leading zeros must be removed. $ echo $((8)) 8 Note also that the use of $[expression] for $((expression)) is documented as deprecated and to be removed in a future version. Better to use $((expression)) instead. Bob

Re: What files are source in bash login shell?

2009-11-17 Thread Bob Proulx
/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PATH="/usr/local/bin:/usr/bin:/bin:/usr/games" $ strings /bin/bash | grep /usr/bin /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Bob

Re: bash40-011 patch can't be applied cleanly

2009-11-19 Thread Bob Proulx
different people will be created differently. That is just the way that it is. If this is the biggest of your issues then you are in great shape! :-) Bob

Re: Bash source repository

2009-11-22 Thread Bob Proulx
leases and all of the patches together (the hard part) then I would be willing to put them together (the easy part) for the version control history. But as you say, then someone still needs to feed it when new official patches are released. Bob

Re: Fullscreen & unchecking show menubar.

2009-12-08 Thread Bob Proulx
you could have it > pop out whenever the mouse pointer touches the top of the screen. That seems reasonable suggestion to make to your terminal program author as a configurable option. Bob

Re: Argument list too long (how to remove the limit)

2010-01-25 Thread Bob Proulx
kernels have removed this limitation and are limited only by available virtual memory. You didn't say what kernel you were using. (e.g. 'uname -a') In any case this FAQ should be useful. http://www.gnu.org/software/coreutils/faq/#Argument-list-too-long Bob

Re: undefined reference to `__strtoll'

2010-02-11 Thread Bob Proulx
es.h Sun Mar 23 00:20:36 2003 @@ -489 +489 @@ -#ifndef __STDC_32_MODE__ +#ifndef __LP64__ As I recall in 64-bit mode all of the strtoull et al routines are broken without this fix. It might have eventually gotten fixed upstream in some later 11.x release by this late date but I don't know. But the problem as reported seems like it may be related. Bob

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Bob Proulx
ot;tmp" is 3 characters and "y -> tmp" is 8 characters and that value is displayed in the size field. So even without knowing the filename to be listed the result can be parsed to extract the target name. Bob

Re: undefined reference to `__strtoll'

2010-02-12 Thread Bob Proulx
d reference to `__strtoll'" (gcc) problem. To fix this for the native HP-UX C compiler in 64-bit mode make the same change to the /usr/include/inttypes.h file. I don't know about the ld core dump though. That shouldn't happen regardless. Hope this helps! Bob

Re: Why tab is not colored?

2010-03-07 Thread Bob Proulx
Peng Yu wrote: > My grep is aliased to "grep --color=auto". > > I then use grep "", where is a tab character. But the > result is not colored. How to make the tabs colored? You might try asking that question on bug-grep. This is bug-bash and your issue does not seem to be with bash. Bob

Re: bash associative array not working at all, so stupid!

2010-03-09 Thread Bob Proulx
t to capture the needed information is preferred. bashbug Bob

Re: Strings manipulation without using variables

2010-03-31 Thread Bob Proulx
hen slip in your variable manipulation right there. for f in *;do FILENAME=${f%.*}; done echo $FILENAME Bob

Re: bash exit command should be unconditional

2010-04-07 Thread Bob Proulx
. Instead use a redirection and no subshell will be created. #!/bin/bash echo Start while read proc do echo $proc exit 1 done < <(ps -ef) echo Continue The "<(command)" syntax is documented in the Process Substitution section of the manual. Bob

Re: bash exit command should be unconditional

2010-04-08 Thread Bob Proulx
I suggested it for /bin/bash specifically and not /bin/sh linked to bash. The redirect syntax would fail if /bin/sh is linked to either a POSIX shell or Bourne shell. Unfortunately when porting applications there are no paths available that don't entail some amount of work. Bob

Re: bash exit command should be unconditional

2010-04-08 Thread Bob Proulx
Greg Wooledge wrote: > Bob Proulx wrote: > > Greg Wooledge wrote: > > > Migrating FROM something that used Korn shell, I presume? Why not > > > just install Korn shell and use #!/bin/ksh on your scripts, if you need > > > to rely on Korn shell features? >

Re: Feature request: Can bash provide some mechanism for locking/unlocking?

2010-04-15 Thread Bob Proulx
utils/util-linux-ng/ There is also 'lockfile' distributed with 'procmail'. http://www.procmail.org/ I tend to use 'mkdir' when I need a semaphore in a shell script. Bob

Re: Feature request: Can bash provide some mechanism for locking/unlocking?

2010-04-15 Thread Bob Proulx
Clark J. Wang wrote: > Bob Proulx wrote: > > There is also 'lockfile' distributed with 'procmail'. > > By using `lockfile' we must make sure that our script will not crash and > the file is unlocked when the script exits. True. That is true of

Re: How to start bash without inheriting any environment variables and user level profiles (such as .bash_profile)?

2010-04-28 Thread Bob Proulx
test this and mistakes in your .bash_profile may prevent bash from starting and thereby preventing you from logging into the system. You could lock yourself out. Always keep a spare login handy in order to fix problems. Bob

Re: possible bug with 4.1

2010-05-03 Thread Bob Proulx
of values includes ignorespace, lines which begin with a space character are not saved in the history list. Remove "ignorespace" from HISTCONTROL and it will save commands that begin with a space too. Bob

Re: How to overwrite a symbolic link?

2010-05-06 Thread Bob Proulx
ill change file 1. I'm wondering if there is way to do so, > > so that I don't have to test whether it is a symbolic link or not > > explicitly. > > rm link1 rm -f link1 The -f will prevent a stat(2) of the target before removal and will prevent a warning if the target has already been removed or otherwise does not exist. Bob

Re: How to overwrite a symbolic link?

2010-05-06 Thread Bob Proulx
recompiling the program. A Comment: Symbolic links are designed to be transparent. Normal programs are not aware of them. You could probably create an LD_PRELOAD library to intercept file modification calls and then handle them in your own code. But I think it would be difficult to do it all completely correctly and not to introduce bugs. I advise against it. Bob

Re: Standard .bashrc needs a minor fix

2010-05-06 Thread Bob Proulx
tributions making use of GNU bash and packaging it for others modify that file. You are certainly free to make any modification there. You don't need an upstream change to do this. Bob

Re: Standard .bashrc needs a minor fix

2010-05-06 Thread Bob Proulx
[[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi' >> $HOME/$profile done Note that it is talking about your profile and not your bashrc file. Bob

Re: How to overwrite a symbolic link?

2010-05-10 Thread Bob Proulx
y keep different versions (modified at different time) of No. Copy-on-write filesystems automatically make a copy of your file when you write to it. Bob

Re: exec status with no command is 0 but no redirection

2010-05-14 Thread Bob Proulx
true | iconv -f ISO_8859-1 -t UTF-8 Beyond this I am not sure what you wanted to do with exec. You may have wanted this: exec iconv -f ISO_8859-1 -t UTF-8 Bob

<    1   2   3   4   5   6   >