Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, Though i know it's not per the shell variable naming format, but does anyone has any idea how can i resolve the error without changing my variable names. [gigauser@gigabuild]$ ...
  1. #1
    Linux Newbie Sangal-Arun's Avatar
    Join Date
    May 2006
    Location
    Gurgaon, India + Denver Colorado USA
    Posts
    101

    Question var.iab.ble=<value> issue in shell

    Hi,

    Though i know it's not per the shell variable naming format, but does anyone has any idea how can i resolve the error without changing my variable names.

    [gigauser@gigabuild]$ himanshu.ali=pakoda
    ksh: himanshu.ali=pakoda: not found
    [gigauser@gigabuild]$ bash
    EXECUTING /projects/stp/home//.bashrc ...
    [gigauser@gigabuild]$

    [gigauser@gigabuild]$ himanshu.ali=pakoda
    bash: himanshu.ali=pakoda: command not found[stpuser@stpbuild]$


    Any ideas!
    Brgds,

    ARUN SANGAL
    SCM: 1- 720 251 9962
    Email: sangal.ak04@gmail.com
    Email: sangal_ak04@yahoo.com

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    According to the bash man page:
    Code:
    A variable is a parameter denoted by a name.
    According to the bash man page, a name is defined as:
    Code:
           name   A word consisting only of  alphanumeric  characters  and  under-
                  scores,  and beginning with an alphabetic character or an under-
                  score.  Also referred to as an identifier.
    Therefore, variables cannot have a dot in them, and you must change your variable names.
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Linux Newbie Sangal-Arun's Avatar
    Join Date
    May 2006
    Location
    Gurgaon, India + Denver Colorado USA
    Posts
    101
    Quote Originally Posted by Cabhan View Post
    According to the bash man page:
    Code:
    A variable is a parameter denoted by a name.
    According to the bash man page, a name is defined as:
    Code:
           name   A word consisting only of  alphanumeric  characters  and  under-
                  scores,  and beginning with an alphabetic character or an under-
                  score.  Also referred to as an identifier.
    Therefore, variables cannot have a dot in them, and you must change your variable names.

    That means, now I have to change something in my ANT code as all ANT variables have lovely "." char in the variable names! great
    Brgds,

    ARUN SANGAL
    SCM: 1- 720 251 9962
    Email: sangal.ak04@gmail.com
    Email: sangal_ak04@yahoo.com

Posting Permissions

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