Find the answer to your Linux question:
Results 1 to 6 of 6
Hello all, The following is in my bashrc and all seems to work except the "netinfo" which works fine as stand alone command. #WELCOME clear echo -e ${LIGHTBLUE}`cat /etc/lsb-release` ; ...
  1. #1
    Linux Newbie AboveNBeyond's Avatar
    Join Date
    Mar 2007
    Posts
    120

    Please review and advise... .bashrc code.

    Hello all,
    The following is in my bashrc and all seems to work except the "netinfo" which works fine as stand alone command.

    #WELCOME
    clear
    echo -e ${LIGHTBLUE}`cat /etc/lsb-release` ;
    echo -e "Kernel Information: " `uname -smr`;
    echo -ne "Hello $USER today is "; date
    echo -e "${WHITE}"; cal ; echo "";
    echo -ne "${CYAN}";netinfo; echo "";
    echo -ne "${LIGHTBLUE}Uptime for this computer is ";uptime | awk /'up/
    {print $3,$4}'
    echo ""; echo ""
    Can anyone see whats wrong? If so please tell me.
    Thanks.

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    What, in detail now, makes you think anything is wrong?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Linux Newbie AboveNBeyond's Avatar
    Join Date
    Mar 2007
    Posts
    120
    Because I get this when bash starts...

    March 2008
    Su Mo Tu We Th Fr Sa
    1
    2 3 4 5 6 7 8
    9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30 31

    bash: netinfo: command not found

    Uptime for this computer is 16:33:14 up 1 day, 1:47, 2 users, load average: 1.00, 0.49, 0.38
    1 day,
    And I would expect the normal output of "netinfo".

  4. #4
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    If netinfo works fine as a stand-alone command then it sounds like PATH isn't defined properly yet to locate the command in your .bashrc. I suggest you put in your .bashrc the full path to the command like this:

    Code:
    echo -ne "${CYAN}";/path/to/netinfo; echo "";
    where '/path/to' is the directory where netinfo is located.

  5. #5
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    If netinfo does not seem to be available or installable, then perhaps this may help.

    I saw a number of mentions of netinfo related to Mac OS X. Sure enough, on an older PowerPC (10.3.9), there are some references to netinfo. The article at NetInfo - Wikipedia, the free encyclopedia suggests it lasted through 10.4 ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  6. #6
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Why the "" after the trailing echoes? If you're just after a newline
    Code:
    echo
    is all you need. And why the trailing semicolons?

Posting Permissions

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