Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Greg Wooledge
On Sat, Aug 26, 2023 at 06:42:42PM -0400, Karl Vogel wrote: > If you're running bash, the safest way to find your current working > directory is capturing the output from /bin/pwd. Symlinked directories > can surprise you: > > me$ cd > > me$ ls -ldF today > lrwxr-xr-x 1 me mis 18

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Karl Vogel
On Sat, Aug 26, 2023 at 12:09:57PM -0400, Tom Browder wrote: > Excellent mind-reading, Greg! So to use your line I will put in that dir: > "cd /required-dir || exit" > > Thanks so much. And thanks to all others who responded. If you're running bash, the safest way to find your current workin

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread tomas
On Sat, Aug 26, 2023 at 01:54:41PM -0500, Tom Browder wrote: > On Sat, Aug 26, 2023 at 10:42 wrote: [...] > > Basically it is not possible to find out [...] > As I think I replied earier, I am now checking the script is in the > required directory in order to be executed (by the root user) [...

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Tom Browder
On Sat, Aug 26, 2023 at 10:42 wrote: > On Sat, Aug 26, 2023 at 04:45:54PM +0200, DdB wrote: > > Am 26.08.2023 um 16:25 schrieb Tom Browder: > > > Is there a way to distinguish whether 'sudo -i' was used or not? > > > > > Sorry, i am not an expert on this. But ... since years i am using this > > t

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Nate Bargmann
* On 2023 26 Aug 11:10 -0500, Tom Browder wrote: > On Sat, Aug 26, 2023 at 10:57 Greg Wooledge wrote: > > > On Sat, Aug 26, 2023 at 10:49:45AM -0500, Tom Browder wrote: > > > I would like to know whether 'sudo -i' or 'sudo -s' was used. > > ... > > > In fact, I suspect "I need to know if the cw

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread tomas
On Sat, Aug 26, 2023 at 11:56:27AM -0400, Greg Wooledge wrote: > On Sat, Aug 26, 2023 at 10:49:45AM -0500, Tom Browder wrote: > > I would like to know whether 'sudo -i' or 'sudo -s' was used. > > That's STILL an X-Y problem. > > > The reason is > > to know if the cwd is set to '/root' or '.' It's

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Michael Kjörling
On 26 Aug 2023 11:56 -0400, from g...@wooledge.org (Greg Wooledge): > You don't actually need to know what was typed. And even being able to answer the question "how was sudo executed" doesn't solve the problem of ensuring that the script is executing within a particular directory. All it takes is

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Tom Browder
On Sat, Aug 26, 2023 at 10:57 Greg Wooledge wrote: > On Sat, Aug 26, 2023 at 10:49:45AM -0500, Tom Browder wrote: > > I would like to know whether 'sudo -i' or 'sudo -s' was used. ... > In fact, I suspect "I need to know if the cwd is /root" is STILL an X-Y > problem. It's sounding like "I nee

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Greg Wooledge
On Sat, Aug 26, 2023 at 10:49:45AM -0500, Tom Browder wrote: > I would like to know whether 'sudo -i' or 'sudo -s' was used. That's STILL an X-Y problem. > The reason is > to know if the cwd is set to '/root' or '.' It's critical for the script > execution Oh? Then just look at the current work

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Tom Browder
On Sat, Aug 26, 2023 at 09:32 Roberto C. Sánchez wrote: > On Sat, Aug 26, 2023 at 09:25:10AM -0500, Tom Browder wrote: > >In a previous thread it was shown how to detect a SUDO_USER in a bash > >shell. > >Is there a way to distinguish whether 'sudo -i'

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread tomas
On Sat, Aug 26, 2023 at 04:45:54PM +0200, DdB wrote: > Am 26.08.2023 um 16:25 schrieb Tom Browder: > > Is there a way to distinguish whether 'sudo -i' was used or not? > > > Sorry, i am not an expert on this. But ... since years i am using this > to check for it: > > > # if `echo $HOME` is not "/

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Alain D D Williams
On Sat, Aug 26, 2023 at 09:25:10AM -0500, Tom Browder wrote: > In a previous thread it was shown how to detect a SUDO_USER in a bash shell. > > Is there a way to distinguish whether 'sudo -i' was used or not? I have not tested this but if bash was interactive you will find a

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread DdB
Am 26.08.2023 um 16:25 schrieb Tom Browder: > Is there a way to distinguish whether 'sudo -i' was used or not? > Sorry, i am not an expert on this. But ... since years i am using this to check for it: > # if `echo $HOME` is not "/root" or the working dir (pwd) is not "/root", > then this was not

Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Roberto C . Sánchez
On Sat, Aug 26, 2023 at 09:25:10AM -0500, Tom Browder wrote: >In a previous thread it was shown how to detect a SUDO_USER in a bash > shell. >Is there a way to distinguish whether 'sudo -i' was used or not? >Thanks. >-Tom The SUDO_COMMAND environment v

Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Tom Browder
In a previous thread it was shown how to detect a SUDO_USER in a bash shell. Is there a way to distinguish whether 'sudo -i' was used or not? Thanks. -Tom

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-09 Thread Nate Bargmann
* On 2020 08 Jul 08:38 -0500, Greg Wooledge wrote: > There are lots of choices here. And this is with only the login shell > layer involved -- no X11 or Wayland. Good points and it must be emphasized that ~/.profile or ~/.bash_profile are for *login* shells only. Ordinarily shells started from a

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-08 Thread Greg Wooledge
On Wed, Jul 08, 2020 at 07:53:53AM -0500, Nate Bargmann wrote: > https://noah.meyerhans.us/2020/07/07/setting-environment-variables-for-gnome-session/ > As I read it, where an environment variable should be set depends on the > intended scope of the variable. One comment in response to the blog >

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-08 Thread Nate Bargmann
* On 2020 07 Jul 08:58 -0500, Stephen P. Molnar wrote: > The Subject line is the problem with my Debian Buster platform. Now from > Google I see that there has been a change in the way Debian handles this > problem. > > My user path statement is: > > comp@AbNormal:~$ echo $PATH > /usr/local/bin:/

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-08 Thread Zenaan Harkness
lay manager login, though. > > With a DM login, you have a bunch of sh scripts (which aren't even login > shells) that can export variables but *not* functions. You don't get > a bash shell until you actually open a terminal. > > None of your shell's dot files are us

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-08 Thread Greg Wooledge
ith the intent to make them available in all of your future xterms *will* work from here. They *won't* work from a display manager login, though. With a DM login, you have a bunch of sh scripts (which aren't even login shells) that can export variables but *not* functions. You don't

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Andrei POPESCU
On Mi, 08 iul 20, 10:44:39, Zenaan Harkness wrote: > > - so try somewhere in the session startup apps - nope, courdn't > figure it out at least For Debian you want ~/.xsessionrc Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser signature.asc Description: PGP signature

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Andrei POPESCU
On Mi, 08 iul 20, 09:59:52, Zenaan Harkness wrote: > On Tue, Jul 07, 2020 at 10:29:47AM -0400, Greg Wooledge wrote: > > > > $HOME/bin is placed into the user's default PATH by Debian's ~/.profile > > (the one in /etc/skel/.profile) if it exists at the time the ~/.profile > > is read, if the ~/.pro

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread David Wright
On Tue 07 Jul 2020 at 20:20:11 (-0400), Roberto C. Sánchez wrote: > On Wed, Jul 08, 2020 at 09:59:52AM +1000, Zenaan Harkness wrote: > > On Tue, Jul 07, 2020 at 10:29:47AM -0400, Greg Wooledge wrote: > > > On Tue, Jul 07, 2020 at 03:17:37PM +0100, Jonathan Dowland wrote: > > > > On Tue, Jul 07, 202

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Zenaan Harkness
On Tue, Jul 07, 2020 at 10:16:21AM -0400, Greg Wooledge wrote: > Gods, I am so tired of this question and having to repeat my demands > for BASIC information over and over. > > Here are some resources for those of you who refuse to reveal any of > the necessary background information to get answe

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Roberto C . Sánchez
On Wed, Jul 08, 2020 at 09:59:52AM +1000, Zenaan Harkness wrote: > On Tue, Jul 07, 2020 at 10:29:47AM -0400, Greg Wooledge wrote: > > On Tue, Jul 07, 2020 at 03:17:37PM +0100, Jonathan Dowland wrote: > > > On Tue, Jul 07, 2020 at 04:14:16PM +0200, Nicolas George wrote: > > > > cd ~/bin > > > > ln -

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Zenaan Harkness
Ahh, asked too soon. Thanks Greg. On Tue, Jul 07, 2020 at 10:16:21AM -0400, Greg Wooledge wrote: > On Tue, Jul 07, 2020 at 09:57:34AM -0400, Stephen P. Molnar wrote: > > The Subject line is the problem > > Yeah. The Subject: line reveals the problem: you believe that PATH is > set primarily by

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Zenaan Harkness
On Tue, Jul 07, 2020 at 10:29:47AM -0400, Greg Wooledge wrote: > On Tue, Jul 07, 2020 at 03:17:37PM +0100, Jonathan Dowland wrote: > > On Tue, Jul 07, 2020 at 04:14:16PM +0200, Nicolas George wrote: > > > cd ~/bin > > > ln -s ../opt/something/bin/something > > > > Not in the default PATH either. >

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Nicolas George
Jonathan Dowland (12020-07-07): > Not in the default PATH either. No, but probably one of the first things anybody who has non-elementary use will have configured anyway. Regards, -- Nicolas George signature.asc Description: PGP signature

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Greg Wooledge
On Tue, Jul 07, 2020 at 03:17:37PM +0100, Jonathan Dowland wrote: > On Tue, Jul 07, 2020 at 04:14:16PM +0200, Nicolas George wrote: > > cd ~/bin > > ln -s ../opt/something/bin/something > > Not in the default PATH either. $HOME/bin is placed into the user's default PATH by Debian's ~/.profile (th

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Jonathan Dowland
On Tue, Jul 07, 2020 at 04:14:16PM +0200, Nicolas George wrote: cd ~/bin ln -s ../opt/something/bin/something Not in the default PATH either. -- 👱🏻 Jonathan Dowland ✎j...@debian.org 🔗 https://jmtd.net

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Greg Wooledge
On Tue, Jul 07, 2020 at 09:57:34AM -0400, Stephen P. Molnar wrote: > The Subject line is the problem Yeah. The Subject: line reveals the problem: you believe that PATH is set primarily by your shell. It's not. It's set primarily by your method of login, and then by your session tools, whether t

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Nicolas George
Roberto C. Sánchez (12020-07-07): > You should add the export command to ~/.bashrc (for it to only be in > effect for that user) Except ~/.bashrc is only sourced for interactive shells, it will not be run when applications are executed by a GUI, for example. (Also, for some reason, the bash autho

Re: How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Roberto C . Sánchez
On Tue, Jul 07, 2020 at 09:57:34AM -0400, Stephen P. Molnar wrote: > The Subject line is the problem with my Debian Buster platform. Now from > Google I see that there has been a change in the way Debian handles this > problem. > I'm not sure what change you are referring to, but from what you des

How To Permanently Add-to a Users PATH Statement in the Bash Shell

2020-07-07 Thread Stephen P. Molnar
The Subject line is the problem with my Debian Buster platform. Now from Google I see that there has been a change in the way Debian handles this problem. My user path statement is: comp@AbNormal:~$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games Now I have a number of app

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread Thomas Schmitt
Hi, Greg Wooledge wrote: > https://lists.gnu.org/archive/html/bug-bash/2015-07/msg00125.html which states $ test -n '<' -a true -bash: test: too many arguments This looks rather like the effect of having an operator named '<': $ test 1 '<' 2 && echo yes yes $ test 3 '<' 2 && echo yes

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread Greg Wooledge
On Tue, Sep 27, 2016 at 05:05:08PM +0200, Thomas Schmitt wrote: > Greg Wooledge wrote: > > Do not use -o and -a in a test command. > > http://mywiki.wooledge.org/BashPitfalls#pf6 > > As if anybody would dare to touch the old "test" command. :)) > > Rather i avoid "[" brackets, not to allow any im

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread Thomas Schmitt
Hi, i wrote: > > if you cannot find a dash tutorial then get a tutorial for bash or sh and > > test in dash whether the proposals apply properly. Greg Wooledge wrote: > First, there are more bad tutorials out there in the wild than good > tutorials, by at least one order of magnitude. But the c

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread Greg Wooledge
On Tue, Sep 27, 2016 at 10:07:14AM +0200, Thomas Schmitt wrote: > if you cannot find a dash tutorial then get a tutorial for bash or sh and > test in dash whether the proposals apply properly. This is potentially bad advice, for several reasons. First, there are more bad tutorials out there in t

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread Thomas Schmitt
Hi, for a moment, my fingers were faster than my brain. I wrote: > The "test" expression used is "A = B". There are operators like "-o" for > logical "or". "A -o B" is true if a is true, or if be is true, or both are > true. Translation via brain: The "test" expression used is "`hostname`" =

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread Thomas Schmitt
Hi, if you cannot find a dash tutorial then get a tutorial for bash or sh and test in dash whether the proposals apply properly. (You can reach dash in dialog by typing "dash" into a bash window.) Bash and dash both stem from S.R.Bourne's sh. The shell chapters of his book "The Unix System" from

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-27 Thread David
t;> I need for the case when evaluates to marybobsam . >>> I can find examples in bash shell, but I need dash. >> >> Are you asking how to check for the substring "bob" in your input, >> in POSIX sh? Use case, and a glob: >> >> case $input i

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-26 Thread The Wanderer
need for the case when evaluates to marybobsam . >>> I can find examples in bash shell, but I need dash. >> >> Are you asking how to check for the substring "bob" in your input, >> in POSIX sh? Use case, and a glob: >> >> case $input in >>

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-26 Thread Richard Owlett
On 9/26/2016 10:42 AM, Greg Wooledge wrote: On Mon, Sep 26, 2016 at 10:39:59AM -0500, Richard Owlett wrote: # string if [ "`hostname`" = bob ]; then echo bob.cfg; fi I need for the case when evaluates to marybobsam . I can find examples in bash shell, but I need dash. Are you

Re: Substring search in dash [ _NOT_ bash ] shell

2016-09-26 Thread Greg Wooledge
On Mon, Sep 26, 2016 at 10:39:59AM -0500, Richard Owlett wrote: > # string if [ "`hostname`" = bob ]; then echo bob.cfg; fi > > I need for the case when evaluates to marybobsam . > I can find examples in bash shell, but I need dash. Are you asking how to check for

Substring search in dash [ _NOT_ bash ] shell

2016-09-26 Thread Richard Owlett
then echo bob.cfg; fi I need for the case when evaluates to marybobsam . I can find examples in bash shell, but I need dash. Are there equivalents of https://www.gnu.org/software/bash/manual/bash.html or http://www.tldp.org/LDP/Bash-Beginners-Guide/html/Bash-Beginners-Guide.html BUT for dash *NOT* bash? TIA

Re: bash - shell events "!"

2016-05-10 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, May 10, 2016 at 11:32:47AM +0200, Die Optimisten wrote: > Hello > > echo hello!# displays that, BUT: > echo "Hello!" # tells: > -su: !": event not found# this worked years before without problem! > Is that intended? These leads to

Re: bash Shell - escapes

2016-05-10 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, May 10, 2016 at 11:20:23AM +0200, Die Optimisten wrote: > On 2016-05-10 11:18, Die Optimisten wrote: > >Hi, > > > >How can I escape a ' inside '...' > >e.g. perl -e 'print '$ and a' '# I don't want to use " The short answer is... you can't

Re: bash - shell events "!"

2016-05-10 Thread Jonathan bartoua Schneider
Hi, It is the historical part of C shell, you can disable it typing or adding it to your profile : set +H Regards, Jonathan Le 10 mai 2016 11:48 AM, "Die Optimisten" a écrit : Hello echo hello!# displays that, BUT: echo "Hello!" # tells: -su: !": event not found# this worked years

bash - shell events "!"

2016-05-10 Thread Die Optimisten
Hello echo hello!# displays that, BUT: echo "Hello!" # tells: -su: !": event not found# this worked years before without problem! Is that intended? These leads to errors in many scripts (including installig package dkms) How can this be turned off? For me this behaviou should be cha

bash Shell - escapes

2016-05-10 Thread Die Optimisten
On 2016-05-10 11:18, Die Optimisten wrote: Hi, How can I escape a ' inside '...' e.g. perl -e 'print '$ and a' '# I don't want to use " thank you Andrew I have to add, its bash - specific and PLEASE also CC: me using inform (AT) die-optimisten.net I'm not subscribed here THANKs

Re: bash shell variables with spaces

2004-07-18 Thread Matthias Czapla
On Mon, Jul 19, 2004 at 10:33:02AM +1000, Zenaan Harkness wrote: > Which raises the question - what if the expansion contains double quote > chars? Perhaps using double-backslash (or quad??) would do the trick? You mean like this?: $ FOO='foo "more foo" bar' $ echo "$FOO" foo "more foo" bar This

Re: bash shell variables with spaces

2004-07-18 Thread Zenaan Harkness
On Mon, 2004-07-19 at 10:27, Zenaan Harkness wrote: > Does anyone know why the following works: > > #!/bin/sh -x > FONT=-jmk-neep\ alt-medium-r-semicondensed-*-*-100-*-*-c-*-iso8859-15 > xterm -sl $BUFFER -fn $FONT -geometry 87x96+447+26 Sorry, the last line above should be: xterm -sl $BUFFER -f

bash shell variables with spaces

2004-07-18 Thread Zenaan Harkness
Does anyone know why the following works: #!/bin/sh -x FONT=-jmk-neep\ alt-medium-r-semicondensed-*-*-100-*-*-c-*-iso8859-15 xterm -sl $BUFFER -fn $FONT -geometry 87x96+447+26 But neither of the following work: #!/bin/sh -x FONT="-jmk-neep alt-medium-r-semicondensed-*-*-100-*-*-c-*-iso8859-15"

Re: SOLVED: How to use apostrophe in bash shell script?

2002-09-30 Thread Bob Proulx
Kent West <[EMAIL PROTECTED]> [2002-09-30 20:51:17 -0500]: > Thanks to Nate's help, I found the problem. I had another line above > this one with a similar echo'd line that had an > apostrophe. Apparently bash was interpreting everything between the > two apostrophe's as a string, which explains s

SOLVED: How to use apostrophe in bash shell script?

2002-09-30 Thread Kent West
Kent West wrote: > nate wrote: > > > Kent West said: > > > I'm trying to use the following in a bash shell script: > > > > > > echo This machine's name and IP address > > > cat /etc/hosts | grep $HOSTNAME > > > > try

Re: How to use apostrophe in bash shell script?

2002-09-30 Thread Kent West
nate wrote: > Kent West said: > > I'm trying to use the following in a bash shell script: > > > > echo This machine's name and IP address > > cat /etc/hosts | grep $HOSTNAME > > try enclosing the line in quotes: > > echo "This machine's

Re: How to use apostrophe in bash shell script?

2002-09-30 Thread nate
Kent West said: > I'm trying to use the following in a bash shell script: > > echo This machine's name and IP address > cat /etc/hosts | grep $HOSTNAME try enclosing the line in quotes: echo "This machine's IP address" seems to work for me nate

How to use apostrophe in bash shell script?

2002-09-30 Thread Kent West
I'm trying to use the following in a bash shell script: echo This machine's name and IP address cat /etc/hosts | grep $HOSTNAME but the echo'd line doesn't print the apostrophe. I've tried several variations, and from what I've read in man bash and on the web, i

RE: bash shell

2000-10-05 Thread Sean 'Shaleh' Perry
On 05-Oct-2000 XEN O wrote: > I am currently running a red hat derivative linux and an looking to change to > debian (as reports speak highly of it). However, it seems from looking at > the list of shells packaged with debian it does not come with the bash shell > - it this righ

Re: bash shell

2000-10-05 Thread Paul D. Smith
%% XEN O <[EMAIL PROTECTED]> writes: xo> I am currently running a red hat derivative linux and an looking xo> to change to debian (as reports speak highly of it). However, it xo> seems from looking at the list of shells packaged with debian it xo> does not come with t

Re: bash shell

2000-10-05 Thread -dsr-
On Thu, Oct 05, 2000 at 10:39:34AM -0700, XEN O wrote: > I am currently running a red hat derivative linux and an looking to change to > debian (as reports speak highly of it). However, it seems from looking at > the list of shells packaged with debian it does not come with the b

Re: bash shell

2000-10-05 Thread Aaron Brashears
Bash is the default shell. XEN O wrote: > > I am currently running a red hat derivative linux and an looking to change to > debian (as reports speak highly of it). However, it seems from looking at > the list of shells packaged with debian it does not come with the bash shell

bash shell

2000-10-05 Thread XEN O
I am currently running a red hat derivative linux and an looking to change to debian (as reports speak highly of it). However, it seems from looking at the list of shells packaged with debian it does not come with the bash shell - it this right ?? If this is not the correct place to ask this

Re: How to escape this for the bash shell...

1999-08-07 Thread Lex Chive
On Wed, Aug 04, 1999 at 03:08:55PM -0500, Michael Merten wrote: > On Wed, Aug 04, 1999 at 03:08:20PM +0300, Alex Shnitman wrote: > > On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > > > > > I have a file named : > > > > > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > > > > > ..

Re: How to escape this for the bash shell...

1999-08-04 Thread Colin Marquardt
* Michael Merten <[EMAIL PROTECTED]> writes: > It does look like escape sequences, but what key would produce ?[4~ > ... the closest I can find is PgDn which produces ^[[4~. Is there > a table/chart/listing of these somewhere for a linux term? console_codes(4), but I don´t know how the codes men

Re: How to escape this for the bash shell...

1999-08-04 Thread Michael Merten
On Wed, Aug 04, 1999 at 03:08:20PM +0300, Alex Shnitman wrote: > On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > > > I have a file named : > > > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > > > ... in my home directory. > > > > I am wondering how to escape this properly for

Re: How to escape this for the bash shell...

1999-08-04 Thread Nathan Duehr
This worked. I feel silly... that was TOO simple. Thanks Shao. p.s. Using single-quotes didn't work, unless I misread and it was supposed to be single-backquotes? On Wed, 4 Aug 1999, Shao Zhang wrote: > have you tried > > rm ./?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > > On Wed, Au

Re: How to escape this for the bash shell...

1999-08-04 Thread Eberhard Burr
Nate Duehr <[EMAIL PROTECTED]> writes: > I have a file named : > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > ... in my home directory. > > I am wondering how to escape this properly for rm to work on it in > bash. bash will properly escape it if you use file-name completion. Thus if yo

Re: How to escape this for the bash shell...

1999-08-04 Thread David Wright
Quoting Alex Shnitman ([EMAIL PROTECTED]): > On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > > > I have a file named : > > > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > > > ... in my home directory. > > > > I am wondering how to escape this properly for rm to work on it in

Re: How to escape this for the bash shell...

1999-08-04 Thread Alex Shnitman
On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > I have a file named : > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > ... in my home directory. > > I am wondering how to escape this properly for rm to work on it in > bash. Most people told you to rm ./file or rm 'file' but

Re: How to escape this for the bash shell...

1999-08-04 Thread Mirek Kwasniak
On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > I have a file named : > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > ... in my home directory. > > I am wondering how to escape this properly for rm to work on it in > bash. > > Someone suggested using Midnight Commander, but

Re: How to escape this for the bash shell...

1999-08-04 Thread Shao Zhang
have you tried rm ./?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > I have a file named : > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > ... in my home directory. > > I am wondering how to escape this properly for rm to work o

Re: How to escape this for the bash shell...

1999-08-04 Thread Ludovic Paquet
Nate Duehr wrote: I have a file named : ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ ... in my home directory. I am wondering how to escape this properly for rm to work on it in bash. Someone suggested using Midnight Commander, but it doesn't even list it as showing up in the directory, so it obv

Re: How to escape this for the bash shell...

1999-08-04 Thread Michael Merten
On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote: > I have a file named : > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > ... in my home directory. > > I am wondering how to escape this properly for rm to work on it in > bash. > > For this one, I'd just enclose the filename in

Re: How to escape this for the bash shell...

1999-08-04 Thread Mark Wagnon
Nate Duehr wrote: > > I have a file named : > > ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ > > ... in my home directory. > have you tried 'rm ./FILE'? There are several ways to delete files with weird filenames. There was a thread on it last month. Take a look at: http://www.debian.org/L

How to escape this for the bash shell...

1999-08-04 Thread Nate Duehr
I have a file named : ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~ ... in my home directory. I am wondering how to escape this properly for rm to work on it in bash. Someone suggested using Midnight Commander, but it doesn't even list it as showing up in the directory, so it obviously doesn't

Re: bash shell prompt

1998-09-04 Thread E.L. Meijer \(Eric\)
[...] > .bashrc only gets read for subshells. .bash_profile always get read no > matter what. You can also source .bashrc from .bash_profile and you can > forget about order. -marlon Not true. The file ~/.bash_profile is sourced only in interactive _login_ shells. If you rea

Re: bash shell prompt

1998-09-03 Thread Marlon Urias
On Thu, 3 Sep 1998, M.C. Vernon wrote: > > > My guess was that the .bashrc in my home directory needed the > > same PS1 environment as the .bashrc in the root directory so I > > added > > > > export PS1='\h:\w\$ ' > > > > but this does not solve the problem UNLESS I login as myself and >

Re: bash shell prompt

1998-09-03 Thread David Warnock
To everyone who has replied to my question. Thanks I have my prompt as I want it, I also now understand some of the bash man information. I also just wanted to check that my new netscape 4.06 is working. Dave

Re: bash shell prompt

1998-09-03 Thread Nathan E Norman
On Thu, 3 Sep 1998, Julian Gilbey wrote: : > Hi, : > : > On Hamm, if I login as root or while logged in as myself do a "su" : > then my shell prompt shows the host and current directory. : > : > When I am logged in as myself my prompt is just a $ : > : > I much prefer to see the curren

Re: bash shell prompt

1998-09-03 Thread Julian Gilbey
> Hi, > > On Hamm, if I login as root or while logged in as myself do a "su" > then my shell prompt shows the host and current directory. > > When I am logged in as myself my prompt is just a $ > > I much prefer to see the current directory in my prompt. So how do > I change it? > > My guess

Re: bash shell prompt

1998-09-03 Thread M.C. Vernon
> My guess was that the .bashrc in my home directory needed the > same PS1 environment as the .bashrc in the root directory so I > added > > export PS1='\h:\w\$ ' > > but this does not solve the problem UNLESS I login as myself and > then type > > bash > > at which point the prompt change

bash shell prompt

1998-09-03 Thread David Warnock
Hi, On Hamm, if I login as root or while logged in as myself do a "su" then my shell prompt shows the host and current directory. When I am logged in as myself my prompt is just a $ I much prefer to see the current directory in my prompt. So how do I change it? My guess was that the .bashrc i

Re: bash shell script questions

1998-01-11 Thread Rob S. Wolfram
David Stern wrote: [snip] > > You should use '#!/bin/bash' really, because now sh is just a link > > to bash, but you are not guaranteed that in a future version it will > > be another shell, or that bash _will_ act more (dumb) Bourne like in > > the future when called as 'sh' (I for one would app

Re: bash shell script questions

1998-01-10 Thread David Stern
On Fri, 09 Jan 1998 23:01:54 +0100, "Rob S. Wolfram" wrote: > David Stern wrote: >>[..] > news://comp.unix.shell I know now. > > 1.) How do I insert a newline character in a "double-quoted" string? > If you mean "when using bash's built-in echo command", use > echo -e "Test\nMoreText" I'll use

Re: bash shell script questions

1998-01-10 Thread Rob S. Wolfram
David Stern wrote: > I know this isn't a bash shell script news group, but the fact is I > can't find one. Since bash is the default linux shell, I was hoping news://comp.unix.shell > someone could answer a few pretty simple questions. > > 1.) How do I insert a newli

Re: bash shell script questions

1998-01-08 Thread David Stern
On Wed, 07 Jan 1998 21:27:01 +1030, John Spence wrote: > > I know this isn't a bash shell script news group, but the fact is I > > can't find one. Since bash is the default linux shell, I was hoping > > someone could answer a few pretty simple questions. > > H

Re: bash shell script questions

1998-01-07 Thread bhmit1
On Tue, 6 Jan 1998, David Stern wrote: > Hi, > > I know this isn't a bash shell script news group, but the fact is I > can't find one. Since bash is the default linux shell, I was hoping > someone could answer a few pretty simple questions. > > 1.) How do I

Re: bash shell script questions

1998-01-07 Thread John Spence
> I know this isn't a bash shell script news group, but the fact is I > can't find one. Since bash is the default linux shell, I was hoping > someone could answer a few pretty simple questions. Hi David. Try this link for an intro to Bourne shell scripts. http://riceinf

bash shell script questions

1998-01-07 Thread David Stern
Hi, I know this isn't a bash shell script news group, but the fact is I can't find one. Since bash is the default linux shell, I was hoping someone could answer a few pretty simple questions. 1.) How do I insert a newline character in a "double-quoted" string? 2.) What

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-13 Thread Shaya Potter
On Fri, 13 Dec 1996, Craig Sanders wrote: > > On Wed, 11 Dec 1996, Shaya Potter wrote: > > > > 1. ftp is still missing from the base install set. This makes it > > > difficult to install a custom compiled kernel. Actually impossible > > > if you don't have your kernel available on an nf

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Daniel Stringfield
On Fri, 13 Dec 1996, Craig Sanders wrote: > i've had the dubious pleasure of running into the same problem on > a variety of machines (mainly because the hardware supplier seems > completely unable to provide the same motherboards in each new batch of > machines). 486 motherboards are starting to

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Craig Sanders
On Wed, 11 Dec 1996, Shaya Potter wrote: > > 1. ftp is still missing from the base install set. This makes it > > difficult to install a custom compiled kernel. Actually impossible > > if you don't have your kernel available on an nfs mount or floppy > > disk. > > Don't know what yo

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Craig Sanders
On Wed, 11 Dec 1996, Daniel Stringfield wrote: > On Wed, 11 Dec 1996, Bruce Perens wrote: > > > > MBR doesn't work for me. No matter what I do, I can not get a machine > > > to boot linux from the hard disk if MBR is in the master boot record. > > > > Can you figure out why? > > What BIOS do

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Shaya Potter
On Thu, 12 Dec 1996, Craig Sanders wrote: > this fixes most of the problems i had with the 1996-12-7 set. I'm still > having a few problems with the new disks: > > 1. ftp is still missing from the base install set. This makes it > difficult to install a custom compiled kernel. Actually impos

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Craig Sanders
On Wed, 11 Dec 1996, Bruce Perens wrote: > > MBR doesn't work for me. No matter what I do, I can not get a > > machine to boot linux from the hard disk if MBR is in the master > > boot record. > > Can you figure out why? no, the only thing remaining for me to try is to NOT use the Maximise optio

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Daniel Stringfield
On Wed, 11 Dec 1996, Bruce Perens wrote: > > MBR doesn't work for me. No matter what I do, I can not get a machine > > to boot linux from the hard disk if MBR is in the master boot record. > > Can you figure out why? What BIOS do you have? (Brand and bios date) I think this may end up being th

Re: how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-12 Thread Bruce Perens
From: Craig Sanders <[EMAIL PROTECTED]> > ftp is still missing from the base install set. Might not get fixed in 1.2, I'm out of space. > MBR doesn't work for me. No matter what I do, I can not get a machine > to boot linux from the hard disk if MBR is in the master boot record. Can you figure

how to get a bash shell with the new install floppies (Re: new boot floppies being uploaded)

1996-12-11 Thread Craig Sanders
y2. - type: cd /target export LD_LIBRARY_PATH="/target/lib:/target/usr/lib" ./usr/sbin/chroot /target this gets you a bash shell chrooted to /target. The environment is very similar to what you'd get after booting - except that NONE of the /etc/init.d/