Results 1 to 9 of 9

Thread: BASH Questions

  1. #1
    Join Date
    Mar 2005
    Posts
    47

    BASH Questions

    I have a bash prompt on my hr10-250 and attached the serial console for reference. What I don't understand is the following...

    Is there a concept of 'root'? When I ls -l at root i don't see my .profile.

    I can't execute ifconfig. It is not found, and, the .profile doesn't get executed at startup.

    When I type $PATH it echos the path but also: No such file or directory.

    Thanks for any help.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2004
    Posts
    459
    You should type "echo $PATH". Just typing $PATH tries to execute it.

    I just put my profile stuff in /etc/profile. Can't remember if the bash shell uses it.

    This leads me to think you've mis-typed something in rc.sysinit:
    /etc/rc.d/rc.sysinit: /dev/tty/S2: Not a directory
    How do you know ifconfig is not running - there's no error in your output. Do you see it running if you type "ps aux"?
    There's no place like ~/

  3. #3
    Join Date
    May 2004
    Posts
    247
    Quote Originally Posted by AhoyMatey
    You should type "echo $PATH". Just typing $PATH tries to execute it.
    Or just enter "set", which gives you all that and more.

  4. #4
    Join Date
    Mar 2004
    Posts
    2
    Quote Originally Posted by HDorBust
    When I ls -l at root i don't see my .profile.
    .profile, or any file starting with a '.' is considered hidden. You can use the -a switch to list hidden files. If you want to list hidden files with the -l switch, you can use the following at a bash prompt:

    Code:
    ls -la

  5. #5
    Join Date
    Mar 2005
    Posts
    47
    Sorry. I knew better than not doing an ls -al

    ifconfig ran in the rc.sysinit but when I type it in the serial term window I get Command not found. So I assume the path is screwed up. Maybe some can tell me where to look.

    Also, I don't seem to have an editor I've tried vi, vin, edit, ed, pico, and mayby some others. Where can I get one?

    There is a type-o in the rc.sysinit. I had the line to enable the serial port in the file twice so it worked. The second one is correct. Thanks.

  6. #6
    Join Date
    Jul 2004
    Posts
    167
    Quote Originally Posted by AhoyMatey
    You should type "echo $PATH". Just typing $PATH tries to execute it.

    I just put my profile stuff in /etc/profile. Can't remember if the bash shell uses it.

    This leads me to think you've mis-typed something in rc.sysinit:How do you know ifconfig is not running - there's no error in your output. Do you see it running if you type "ps aux"?
    The bash shell will user /etc/profile if it is there.

    Dave

  7. #7
    Join Date
    Jan 2004
    Posts
    459
    Quote Originally Posted by dave4089
    The bash shell will user /etc/profile if it is there.

    Dave
    I should have said "serial console" instead of bash, but it's just another way of accessing bash...
    There's no place like ~/

  8. #8
    Join Date
    Mar 2005
    Posts
    47
    My problem, along with other stuff, was I was using the serial connection to do stuff. When I changed over to the telnet connection everything worked.

  9. #9
    Join Date
    Apr 2003
    Posts
    2,402
    Quote Originally Posted by HDorBust
    Sorry. I knew better than not doing an ls -al

    ifconfig ran in the rc.sysinit but when I type it in the serial term window I get Command not found. So I assume the path is screwed up. Maybe some can tell me where to look.

    Also, I don't seem to have an editor I've tried vi, vin, edit, ed, pico, and mayby some others. Where can I get one?

    There is a type-o in the rc.sysinit. I had the line to enable the serial port in the file twice so it worked. The second one is correct. Thanks.
    Typically you environment variables aren't all available in serial console. When you use it you can export your $PATH and other env variables and all will work as expected. That's why you don't have access to all commands that are available in a telnet session.

    ew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •