Find the answer to your Linux question:
Results 1 to 2 of 2
Hi I have to migrate the code from unix to linux. In unix for variable attribute assignment there is a command "typeset",which has option like -L,-R,-u. now i have to ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    1

    Question Variable Attribute Assignment Format

    Hi
    I have to migrate the code from unix to linux.
    In unix for variable attribute assignment there is a command "typeset",which has option like -L,-R,-u.
    now i have to implement the same functionality of typeset in the linux.
    is there any command to set variable attribute in the linux?
    Please help me.
    E.g
    $ typeset -R5 MY_VAR1
    $ BORDER="|"
    $ MY_VAR1="owl"
    $ print "${BORDER}${MY_VAR1}${BORDER}"
    | owl|
    $

    can i do same thing in linux using command?

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Since this is shell code, as long as you are using the same shell, code should be pretty portable.

    In this case, a reference for Bash's "typeset" command is available at:
    http://www.tldp.org/LDP/abs/html/declareref.html
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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