combination of source and && does not result in current alias to be expanded

2025-05-24 Thread Bob Mroczka
ias ub='echo bye'    hi    bye    Now, I expect the last two lines to read "bye" but they don't. Bob

Re: bug with edit-and-execute-command and multiline commands

2021-08-06 Thread Bob Proulx
o yes; else echo no; fi ed> q if true; then echo yes; else echo no; fi yes > C-d bash: syntax error: unexpected end of file exit Just another rendition of the same thing. Bob

Re: Bash-5.1-rc1 available

2020-11-02 Thread Bob Proulx
uted patch didn't include a configuration option, I didn't add one. Highlighting the region is a completely separate concept from bracketed paste mode as the region is used in many completely unrelated places. It pains me that they are coupled. Bob

Re: Bash-5.1-rc1 available

2020-10-20 Thread Bob Proulx
te mode avoids it for the paste but doesn't address the reverse video of search.) Bob

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-23 Thread Bob Proulx
SSLKEYLOGFILE /home/user/test Using grep is fine. But then the human must interpret the results accordingly. I think here understanding that 'set' is doing what is expected and reasonable is enough. However I would use 'env' to avoid the internal data state. And programatically neither are sufficient for a fully robust program and other methods should be used. Bob

Re: bash sockets: printf \x0a does TCP fragmentation

2018-10-11 Thread Bob Proulx
Dirk Wetter wrote: > PS + @Bob: fd 5 is not a tty in the program -- but interactively in > this PoC you want to make sure it is not taken yet. Understood. I originally mentioned the isatty() thing because that is how libc decides to line buffer or not. But Chet has confirmed that

Re: Command not found with builtins and variables

2018-10-10 Thread Bob Proulx
ely if someone is using the external time it might give them an unexpected result. Since the external time will not know anything about a pipeline. So this might catch people off guard too. $ TEST=foo time -p sleep 1 | sleep 2 real 1.00 user 0.00 sys 0.00 When used it is best to always pu

Re: Segfault on recursive trap/kill

2018-10-08 Thread Bob Proulx
Mike Gerwitz wrote: > Bob Proulx wrote: > > Let me give the discussion this way and I think you will be > > convinced. :-) > > Well, thanks for taking the time for such a long reply. :) > > > How is your example any different from a C program? Or Perl, Python, &

Re: Auto-update program cache feature

2018-10-08 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > > Put this in your ~/.bashrc file and I believe your use case will be > > much happier. > > > > shopt -s checkhash > > How many installers put a new version of an existing package into a > possibly-different directory

Re: Segfault on recursive trap/kill

2018-10-06 Thread Bob Proulx
gram traps a signal then it should restore the default signal handler for that signal and send the signal back to itself. Otherwise the exit code will be incorrect. Otherwise parent programs won't know that the child was killed with a signal. For a highly recommended deep dive into this: https://www.cons.org/cracauer/sigint.html Hope this helps! Bob signature.asc Description: PGP signature

Re: Auto-update program cache feature

2018-10-06 Thread Bob Proulx
nged a behavior back in the day when it was added and deviated from the previous csh behavior. Therefore being an optional option makes sense. But I don't see a downside to defaulting to it now. In any case I always add it to my bashrc file. (Along with "shopt -s checkwinsize" too.) Bob

Re: bash sockets: printf \x0a does TCP fragmentation

2018-09-23 Thread Bob Proulx
Chet Ramey wrote: > It's that bash sets stdout and stderr to be line-buffered, not anything > printf-specific. Shouldn't bash set stdout buffering based upon the output descriptor being a tty or not the same as other libc stdio behavior? Bob

Re: bash sockets: printf \x0a does TCP fragmentation

2018-09-23 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > > It was also noted in another message that the external standalone > > printf command line utility did buffer as you desired. That seems > > another very good solution too. Simply use "command printf ..." to > > force

Re: bash sockets: printf \x0a does TCP fragmentation

2018-09-23 Thread Bob Proulx
Robert Elz wrote: > Bob Proulx wrote: > | Using the same buffer size > | for input and output is usually most efficient. > > Yes, but as the objective seemed to be to make big packets, that is probably > not as important. The original complaint concerned flushing a data

Re: bash sockets: printf \x0a does TCP fragmentation

2018-09-22 Thread Bob Proulx
"one\ntwo\n", 1048576) = 8 write(1, "one\ntwo\n", 8) = 8 read(0, "", 1048576)= 0 +++ exited with 0 +++ It seems to me that using a large buffer size for both read and write would be the most efficient. It can then use the same buffer that data was read into for the output buffer directly. Bob

Re: bash sockets: printf \x0a does TCP fragmentation

2018-09-22 Thread Bob Proulx
I see that you have subscribed now. Awesome! If you and others would be so kind as to list-reply instead of CC'ing me directly that would be great. I read the replies on the mailing list. dirk+b...@testssl.sh wrote: > Bob Proulx wrote: > > You are doing something that is quite

Re: bash sockets: printf \x0a does TCP fragmentation

2018-09-21 Thread Bob Proulx
f the two. | cat Or probably better: | dd status=none bs=1M Or use whatever block size you wish. The 'dd' program will read the input into its buffer and then output that block of data all in one write(2). That seems to be what you are wanting. Good luck! :-) Bob P.S. You can possibly use the 'stdbuf' command to control the output buffering depending upon the program. info stdbuf

Re: Add sleep builtin

2018-08-25 Thread Bob Proulx
to impossible to find any running Unix-like system outside of a museum environment that still behaved that old way. And certainly any using the fractional second extension is past any need to worry about the problem. Because any such system with the problem would only handle to a granularity of integer seconds anyway. Bob

Re: Unexpected delay in using arguments.

2018-08-15 Thread Bob Proulx
to convince yourself. Nothing Stéphane said changed my statement at all. It does look like bash can be more efficient with argument handling. Since, for example, dash does it. Bob

Re: Unexpected delay in using arguments.

2018-08-14 Thread Bob Proulx
arguments in memory. I suggest refactoring the program to avoid the need for this memory stress. Bob

Re: Rational Range Interpretation for bash-5.0?

2018-08-06 Thread Bob Proulx
nd other GNU utilities have done it for some > time. What do folks think? I think the non-rational ranges in libc were a terrible idea that we have all been suffering with over the last decade plus. Bob

Re: Empty ""s in ARG in ${x:+ARG} expand to no words instead of the empty word if prepended/appended with space

2018-07-21 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > > Denys Vlasenko wrote: > >> $ f() { for i; do echo "|$i|"; done; } > >> $ x=x > >> $ e= > >> $ f ${x:+ ""} > >> ^^^ prints nothing, bug? > >> > >> $ $

Re: Empty ""s in ARG in ${x:+ARG} expand to no words instead of the empty word if prepended/appended with space

2018-07-20 Thread Bob Proulx
void the whitespace getting stripped. (Is that during word splitting phase using the IFS? I think so.) Try this: f "${x:+ ""}" f "${x:+"" }" Also in the future please say what version of bash you are using. There have been a lot of bugs fixed in various versions. Bob

Re: announcing bashj

2018-06-23 Thread Bob Proulx
ready had three replies in the thread and therefore I have now approved it and passed it on. For better or worse. For b...@packages.debian.org everyone subscribed to the package list got a copy from there already. Bob

Re: Editing previous lines while in here-document mode (<

2018-05-22 Thread Bob Proulx
ve a full editor available to you for editing them. Don't try to recall and edit them on the command line. There is a very old joke that goes, "Patient: Doctor it hurts when I do this. Doctor: Then don't do that." Bob

Re: [annoyance/non-feature] On OS X, every process is "occupying" CWD, making disk ejects impossible after cd'ing into them.

2018-01-20 Thread Bob Proulx
fail because it would not know the directory was renamed and would be unable to return to it. Bob

Re: xmalloc crash

2018-01-06 Thread Bob Proulx
Processes killed by the OOM have no opportunity to clean up or log anything. Or vm.overcommit_memory can be configured the traditional Unix way where enough virtual memory needs to exist or malloc() and fork() will fail. IMNHO overcommit off is the best way for enterprise servers. However overcommit on is convenient for laptops. Bob

Re: simple function causes BASH to exit when -e in effect

2017-12-24 Thread Bob Proulx
o not meddle in the affairs of 'set -e' for it is subtle and quick to anger. Bob

Re: Bash default /etc/bash.bashrc overwrites PS1 even if SUDO_PS1 is set

2017-12-19 Thread Bob Proulx
th a special option (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc for interactive non-login shells. So, on Debian systems, /etc/bash.bashrc is to ~/.bashrc as /etc/profile is to ~/.bash_profile. Bob

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-10 Thread Bob Proulx
Yuri wrote: > Bob Proulx wrote: > > How is the user logging in? Are they logging in with 'ssh' over the > > network? Or are they logging in through an "xdm" X Display Manager > > login from a graphical login display? > > User logs in locally throug

Re: ~/.profile and ~/.bash_profile aren't executed on login

2017-12-09 Thread Bob Proulx
long* discussion of how each graphical login environment works. Therefore more information about your environment would be needed. > Is this a bug? I feel confident that it is a consequence of how the shell is started. Bob

Re: (OffTopic,) Gnu-Environment restrictions (was Re: Question )

2017-09-28 Thread Bob Proulx
same with this being my last comment here upon it too. > Bob Proulx said (in a message with the original subject): > | You can use the shared kitchen but please leave it in a better state than > | you found it. > > That would be fine, and would be free use. But > >

Re: Question

2017-09-19 Thread Bob Proulx
Robert Elz wrote: > Bob Proulx wrote: > > However this difference in philosophy does not change the technology > > that creating a compiler for an interpreted language is very hard. > > Maybe impossible. > > No. Not impossible, not even all that difficult, just i

Re: Question

2017-09-14 Thread Bob Proulx
the problem and restricting the language it is possible. Just not useful at that point.) Therefore regardless of our differences what you want is not easy to do on a technical level. I don't want to suggest this but... Instead of obfuscating the shell script program it would be better if you chose a compiled language from the start. Then you could simply compile it and have what you want. Bob

Re: Bash handling of ENOENT on missing files and directories

2017-09-14 Thread Bob Proulx
Jonny Grant wrote: > Please keep my email address in any replies > > Bob Proulx wrote: > > Jonny Grant wrote: > > > Yes, it's a known limitation of POSIX that it uses a shared error code for > > > both files and directors, ENOENT. Which without programmer

Re: Question

2017-09-11 Thread Bob Proulx
W such as Bash for Windows or Cygwin so that all of your external dependencies are satisfied. Or using a different language such as C which is natively compiled. Or using a restricted set of Perl, Python, Ruby, or other that already has a compiler available for that restricted subset. Bob

Re: Bash handling of ENOENT on missing files and directories

2017-09-11 Thread Bob Proulx
for longer about this, than it would have > been to fix it. I see no bug to fix here. However I fear that trying to fix an imaginary one would introduce a bug here. Bob

Re: Execution continuing after SIGINT received

2017-08-05 Thread Bob Proulx
nd now every kernel that has followed since. Since that is the common behavior among all systems the standards bodies will mostly say, freeze on that behavior, do it the same way, don't do it differently. Surely that is a good thing, right? The subtleties of https://www.cons.org/cracauer/sigint.html about how programs should behave were learned not all at once but over the course of time. Bob

Re: Execution continuing after SIGINT received

2017-08-05 Thread Bob Proulx
of the program. Software is all about layers and abstraction. Sending the signal to one self to raise the signal again feels good to me. POSIX even added a raise(3) call to make this easier. (Although I still do things the old way.) man 3 raise Bob

Re: Execution continuing after SIGINT received

2017-08-04 Thread Bob Proulx
am exit WIFSIGNALED information is now correct. Signal handlers should always raise the signal on themselves after handling whatever they need to handle first. In any case I can't recreate your problem when using real processes in separate shells not all on one line. Bob

Re: bug in cd

2017-07-19 Thread Bob Proulx
Kae Verens wrote: > but, if you do this: > cd // ; pwd > > then the CLI reports > // Using two "//" at the start of a path name is special because in some systems it means the path component that follows is a hostname. Therefore it must be preserved verbatim. Bob

Re: How to run bash test suite

2017-07-06 Thread Bob Proulx
ing lists write to the mailing list owner at bug-bash-ow...@gnu.org to contact the humans who help with the mailing list. This is the email address convention for all of the Mailman managed mailing lists. Bob

Re: null pointer deref, segfault

2017-01-31 Thread Bob Proulx
)())|>_[$($(<<0)) crashes bash on Debian, Red Hat, FreeBSD, etc. > > It's marked as `Done'. Since it is both marked as Done and also reported to be resolved in bash 4.4 then I have closed the ticket. Bob

Re: Why does bash use xmalloc?

2016-11-06 Thread Bob Proulx
ng out of memory then it is almost certainly due to inefficient shell scripting. For example like one that I analyzed in this thread. Of course that is just one of many possibilities. http://lists.gnu.org/archive/html/bug-bash/2011-11/msg00189.html Bob

Re: forked before bash subshell

2016-10-13 Thread Bob Proulx
. But mostly they are very unusual cases. Not typical cases. Bob

Re: Syslog output from bash

2016-08-22 Thread Bob Proulx
ing bash. Normally I am doing things like this: logger -t cmdname "my log message here" But you can get the format you wish with: logger -t "cmdname[$$]" "your log message here" Bob

Re: Curious case statement error

2016-08-13 Thread Bob Proulx
h shell. In other words to change it for bash you would need something like this: $ ...shell with LC_COLLATE set to en_US.UTF-8 with bad collation ... $ env LC_COLLATE=C bash $ ... works now ... I mention this because otherwise people try changing the variable and then don't see a change in the already running bash shell. Bob

Re: [Documentation] -d returns true for symlink to directory

2016-07-21 Thread Bob Proulx
. I think the statement in the Apple man page is there because someone liked -L over -h and wanted to scare everyone into using one over the other. But there isn't any reason to do so. Bob

Re: Cannot clone from anonymous git

2016-05-15 Thread Bob Proulx
m Europe than from the US. There isn't a reproducible test case to show if a change fixes things or not. I in Colorado have a hard time triggering any problems but have been able to on occasion. But people in Europe have been most of the problem reports. Most of them have been using IPv6. And that is all I know. Bob

Re: Avoid asterisk expansion when it selects "everything"

2016-04-13 Thread Bob Proulx
ng with dangerous commands such as rm then it is wise to check twice before invoking. echo rm * .jpg If you saw the result then you would fix it before invoking the command for effect. If the result is bad then correct it. If the result is good then remove the echo and run the command for effect. Bob

Re: Fwd: read builtin return non-zero status reason

2016-02-24 Thread Bob Proulx
on't worry about it. It is all in the past now. Bob

Re: Fwd: read builtin return non-zero status reason

2016-02-24 Thread Bob Proulx
message had no moderation delay probably due to previous contact there. Please have some patience. Bob

Re: How to lock a terminal

2016-02-17 Thread Bob Proulx
Benno Schulenberg wrote: > Bob Proulx wrote: > > I do not have a nanorc file at all. The defaults are okay for > > suspension without any specific configuration. > > ?? How does that work? What version of nano are you using? Since this has nothing to do bash I am goin

Re: How to lock a terminal

2016-02-16 Thread Bob Proulx
Benno Schulenberg wrote: > Bob Proulx wrote: > > [...] this is the perfect case for job control. No need for a > > second terminal. Here is an example. Use Control-Z to stop the > > foreground job. > > For that to work, it requires having 'set suspend' i

Re: How to lock a terminal

2016-02-16 Thread Bob Proulx
grep a rwp@havoc:~$ jobs rwp@havoc:~$ Simply stop the process and then kill it using the same terminal. Bob P.S. The other suggestions to use Control-X to exit nano are also good too but job control is general for the entire class type of commands like this and I think good to know too.

Re: Future date

2016-01-26 Thread Bob Proulx
months. (And work with times from the middle of the day.) That still isn't absolutely perfect but is good for most calculations. For example: date --date="$(date +%Y-%m-15) +1 month" +'Next month is %B.' And so your case might best be phrased: date -R Wed, 27 Jan 2016 13:10:20 +0800 date --date="$(date +%Y-%m-15) +1 month" +'%b%Y' Feb2016 Bob

Re: [PATCH/RFC] do not source/exec scripts on noexec mount points

2015-12-12 Thread Bob Proulx
without such a check. Or any of the many compatible /bin/sh variants such as ksh, zsh, ash, dash, and so forth. Bob

Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/N) instead of plain pipes?

2015-10-23 Thread Bob Proulx
Linda Walsh wrote: > Bob Proulx wrote: > >Where does the OS claim it is a file descriptor? > 1) in the kernel documentation: > file 'devices.txt: > /dev/fd /proc/self/fd symbolicFile descriptors That shows the file descriptor map for the process.

Re: Design question(s), re: why use of tmp-files or named-pipes(/dev/fd/N) instead of plain pipes?

2015-10-19 Thread Bob Proulx
in 'a': instead: Syntax error in the above. You probably meant to have 'read' read from the pipe and not hand it to read as a variable name argument. echo read var <(sort a) read var /dev/fd/63 You probably meant to use a '<' input redirection there. read var < <(sort a) && echo "var=$var" >a # equates to: read var < /dev/fd/63 That works as you expected. Bob

Re: why must bash zap last search string just because we hit ^C?

2015-10-18 Thread Bob Proulx
ESC C-y will rotate the kill ring to the previous killed text. Repeating ESC C-y again rotates to the one before it. So can walk back through until finding the text I want to yank back. :-) Bob

Re: ! in PS1 in posix mode

2015-10-15 Thread Bob Proulx
ents from one command and other arguments from other commands and stitch them together. Since they were all in the growing roll of trash piling up out of the back to the terminal it was fairly easy to do. Take a pen and underline the numbers you used often in that session to make them easier to see. Bob

Re: SIGINT handling

2015-09-22 Thread Bob Proulx
$rc -ne 0 ]; then echo "Error: failed: ..." 1>&2 exit 1 fi Bob

Re: 4-byte script triggers null ptr deref and segfault

2015-09-17 Thread Bob Proulx
he filed above. He filed a ticket on the web site and then mailed a reference to it here. Bob

Re: Why does a Bash shell script write prompts followed by reads and do it right?

2015-09-02 Thread Bob Proulx
nately I have no time for comments about the rest of the code. Bob

Re: Why does a Bash shell script write prompts followed by reads and do it right?

2015-09-01 Thread Bob Proulx
ing and the output will appear on the tty immediately without need for opening it synchronously or flushing or anything extra. Bob

Re: Why does a Bash shell script write prompts followed by reads and do it right?

2015-09-01 Thread Bob Proulx
urs? That is the wrong direction to go. It is like saying, I have this problem building a small bike shed. I couldn't figure it out. Therefore I downloaded the plans to the Eiffel Tower in order to compare the two. They are not really comparable. Trying to do so is just a distraction from solving your real problem. Bob

Re: In the bash man page the entry for the 'read' command has two spaces after it instead of one.

2015-08-21 Thread Bob Proulx
hat read has options documented. This works. /^ *read *\[ Bob

Re: Worth mentioning in documentation

2015-08-10 Thread Bob Proulx
for efficiency now but everything behaves the same if they are external programs. This is why quoting as if they were external programs is required. On the other hand [[ has always been a builtin and therefore the shell can avoid one layer of quoting and does. Bob

Re: bash displays strange characters after base64 decoding

2015-08-06 Thread Bob Proulx
reset (the line-feed character is normally control-J) to get the terminal to work, as carriage-return may no longer work in the abnormal state. Also, the terminal will often not echo the command. Otherwise the best you can do is to close the terminal and start a new one. Bob

Please pardon the incorrectly handled anti-spam

2015-07-06 Thread Bob Proulx
Please pardon the incorrectly handled anti-spam message re-send seen today. One of the listhelper volunteers had a problem vivifying an incorrectly classified false-positive-as-spam message. Accidents happen. Your patience and tolerance is appreciated. Bob

Re: ShellShock where my browser window randomly re-encodes with what looks like Chinese

2015-07-06 Thread Bob Proulx
ed to any web browser problem either. I don't know where I would direct you for further assistance. I think if you could locate a local user group community they would provide useful assistance to you face-to-face. Bob

Re: Feature : walkthrough lines of stdout

2015-06-17 Thread Bob Proulx
the output of a program into the cut buffer you can pipe it to xclip. Or pull text out of the buffer with xclip. Bob

Re: Should nested case statements within command substitutions work on in bash 3.2.x?

2015-03-21 Thread Bob Proulx
e shells. $ bash -c 'echo $(case yes in (yes) echo yes ;; (no) echo no ;; esac)' yes Bob

Re: Feature: disallow | >

2015-03-18 Thread Bob Proulx
ure fringe Unix lookalike systems did exactly that in their shell. I forget details now. But because of that some of us do always use ":" instead of an empty redirection simply due to it. Bob

Re: Command line prefixed with space is not saved

2015-02-10 Thread Bob Proulx
Vladimir Kanazir wrote: > Bob Proulx wrote: > >The bash default is not to set that variable. But it looks like you > >are using Ubuntu and the Ubuntu package default is to set it in the > >default .bashrc file as a user level customization. > > Yes, they broke many t

Re: Command line prefixed with space is not saved

2015-02-10 Thread Bob Proulx
bashrc file. Customize it as you desire. Bob

Re: Does [ -f FILE ] have a bug on testing a symlink ?

2015-02-09 Thread Bob Proulx
r that case explicitly. Since this is a question and not a bug in bash it would be better discussed in the help-b...@gnu.org mailing list instead. Please send future use discussion there. Thanks. Bob

Re: bash complete.c

2014-12-27 Thread Bob Proulx
make hopping around systems less verbose. touch ~/.hushlogin Bob

Re: bash complete.c

2014-12-26 Thread Bob Proulx
improved there. One problem in your example is that your bash does not have a tty attached to it. Add -t to ssh and you will then get a tty and you won't need to redirect 2>/dev/null anymore. ssh -t localhost bash Bob

Re: Documentation Update

2014-12-12 Thread Bob Proulx
Dennis Williamson wrote: > Bob Proulx wrote: > > I see a lot of hits in the bash_completion add-on files. Should we be > > looking at: > > > > $ grep -r "shopt -s extglob" /etc/bash* > > /etc/bash_completion.d/nmh:shopt -s extglob > >

Re: Documentation Update

2014-12-12 Thread Bob Proulx
d/subversion:# pattern matching enabled (use 'shopt -s extglob progcomp' to enable /etc/bash_completion.d/subversion:shopt -s extglob Bob

Re: bash 4.3: "Clear Scrollback and Reset" (Ctrl-Shift-X) in konsole stopped to work as expected when upgrading from upstream bash 4.2 to upstream bash 4.3

2014-11-29 Thread Bob Proulx
w prompt. I think that is an unreasonable expectation. There hasn't ever been a communication interface for doing such a thing. One could be created. But if so then that would be a *new* interface. Bob signature.asc Description: Digital signature

Re: Sorting processes by NI

2014-11-14 Thread Bob Proulx
u want it sorted then you will have to read the 'ps' man page and add your preferred sort order. If you wish to followup on the ps issue please do so on the help-gnu-ut...@gnu.org mailing list and not here on the bash bug list. The help-gnu-utils list is a relatively generic mailing list for random help discussion about the utilities and the discussion would be fine there. Bob

Re: [PATCH] bracketed paste support

2014-11-04 Thread Bob Proulx
Daniel Colascione wrote: > Bob Proulx wrote: > > I use paste into the shell with an embedded newline in order to > > immediately execute a command *a lot*. If that were removed I would > > be very unhappy. > > I strongly doubt that your use case is typical. It does

Re: [PATCH] bracketed paste support

2014-10-31 Thread Bob Proulx
as an idea that I hadn't thought about before. (I often would paste into my editor and clean it up. But doing it as part of the edit-and-execute-command is very nice!) Thanks for this hint! Bob

Re: [PATCH] bracketed paste support

2014-10-29 Thread Bob Proulx
teraction after a paste to begin > execution, making this attack much less effective. I am very happy this is a feature you like. However I would hate that feature. It should definitely not default to on or it will make people like me very unhappy. Bob

Re: Random loss of bash history

2014-10-09 Thread Bob Proulx
provide more > information. Could you please start out by helping me there? What type of file system is your ~/.bash_history located upon? This sounds like a deja vu from the ext4 file system. Do you observe any other zero sized files after a reboot? Bob

Re: Detecting invocation as /bin/sh ?

2014-09-30 Thread Bob Proulx
targeted that too. So while bash might or might not do some of that it isn't really the project for it. Bob

Re: Not so useless use of cat

2014-09-16 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > > That is one of the reasons I don't like the /dev/std{err,in,out} > > things. They are not portable. They do different things on different > > systems. I avoid them. > > I've considered emulating it everywhere, rega

Re: Not so useless use of cat

2014-09-16 Thread Bob Proulx
gument. There is > no internal Bash magic happening. You get the underlying operating > system implementation, or you get "no such file or directory". That is one of the reasons I don't like the /dev/std{err,in,out} things. They are not portable. They do different things on different systems. I avoid them. Bob

Re: Not so useless use of cat

2014-09-16 Thread Bob Proulx
ore processes. But try this: for i in file[12] ; do program -i "$i" -o >(cat) ; done >outfile Good luck! Bob

Re: Not so useless use of cat

2014-09-13 Thread Bob Proulx
Dennis Williamson wrote: > Bob Proulx wrote: > > And the subshell isn't needed either. Use a list. > > > > { for i in file[12] ; do cat "$i" ; done ;} > both > > There's no need for the curly braces and the last semicolon. Of course you are t

Re: Not so useless use of cat

2014-09-12 Thread Bob Proulx
l isn't really part of the issue. The issue is that the file descriptor is attached and truncated and that is orthogonal to process boundaries. Hope that helps! In the future please consider asking questions such as these on help-b...@gnu.org for general discussion of bash shell scripting. If you expose a bug then report the bug to the bug reporting address. The help-bash list is for help with bash scripting and this would have been perfect there. Bob

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Bob Proulx
ble for you to cut yourself on one? Think about how you would make a kitchen knife safer. Give it a serious think. Then ask yourself this question. Would you use such a knife that you designed yourself? The answer is invariable no. There has always been some inherent danger when using a kitchen knife. We accept this because the alternatives are all worse. Bob

Re: Interactive Expect from bash Script

2014-03-29 Thread Bob Proulx
Andreas Schwab wrote: > Bob Proulx writes: > > > #!/bin/bash > expect -c '...' "$_usr" "$_host" "$_passwd" Of course that works too. Why were you so late to share this wisdom? > RTFM? It has probably been more than fifteen years s

Re: Interactive Expect from bash Script

2014-03-29 Thread Bob Proulx
ight happen, usually HUP, INT, QUIT, TERM, and perhaps PIPE though PIPE is definitely subtle and special. It is rather of a mess. Bash is definitely better in this regard. Bob #!/bin/bash unset tmpfile cleanup() { test -n "$tmpfile" && rm -f "$tmpfile" } trap "cleanup&

Re: Interactive Expect from bash Script

2014-03-29 Thread Bob Proulx
elp-bash mailing list rather than the bug-bash mailing list. The help-bash list is relatively new and so we are always reminding people to use it when appropriate. Bob

Re: Please accept M-p as well as C-p

2014-02-13 Thread Bob Proulx
ntrolled by the line-move-visual variable. Call me a Luddite if you want but in emacs 24 I turn that feature off. I am very much "used to using" the traditional behavior and like it. Thinking about it I think that the recent addition of line-move-visual to emacs and not to libreadline is probably the reason for the request for this feature. Bob

Re: Browsing the history of commands. Inconsistency between Bash and Emacs

2014-02-13 Thread Bob Proulx
C-c M-p for next and previous line? I think there would be and it would just be an endless cycle. As Chet said the mental model of what is happening at those two points of action in each program is different. Bob P.S. This is going to be a rant and run because I am offline for several days after this.

help-bash pointer added to web page

2014-02-02 Thread Bob Proulx
issues to bug-bash. Bob

  1   2   3   4   5   6   >