Sponsored Content
Full Discussion: Typeset issue
Top Forums UNIX for Dummies Questions & Answers Typeset issue Post 302963043 by sharad.40216 on Tuesday 22nd of December 2015 05:10:40 PM
Old 12-22-2015
Typeset issue

Code:
function fxn
{
  echo "target in build_ndm is $target"
}

function main
{
  target=${server_type}
  echo "target in main is $target"
  fxn
}

In the above the value of target is not being propagated to the function while ideally it should be since typeset variables are visible in sub functions

What is the issue here

Moderator's Comments:
Mod Comment edit by bakunin: Please use CODE-tags as prescribed by the forum rules. Thank you.

Last edited by Scrutinizer; 12-24-2015 at 06:16 AM.. Reason: Restored content deleted by OP, otherwise thread incomprehensible
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

TYPESET use

Hi all, I have problem understanding shell script.Written that $bindir/put_load.ksh ; typeset RV= $? I dont have any other document about script. How can i find that $bindir is exist or not what is the content of that, i am working on new box . how can i search that in old box what... (4 Replies)
Discussion started by: sam71
4 Replies

2. Shell Programming and Scripting

typeset -f ???

I have found this command *typeset* and the option * -f *, which should provide me the list of all the currently defined functions. Is there any possibility of specifying the file in which this command to search ? (1 Reply)
Discussion started by: xinfinity
1 Replies

3. Shell Programming and Scripting

typeset

Can anyone show me a simple practical usage of typeset. (1 Reply)
Discussion started by: balaji_prk
1 Replies

4. Shell Programming and Scripting

Typeset

Hi, Could any one please explain about typeset or share any link from where i can study about typeset i.e how to use it, how to define it.. etc? Thanks- Yogi (3 Replies)
Discussion started by: bisla.yogender
3 Replies

5. UNIX and Linux Applications

typeset-r

Hi All , Can any one help me the meaning of typeset -r Thanks, venkat (1 Reply)
Discussion started by: venkatakotiy
1 Replies

6. UNIX for Dummies Questions & Answers

Typeset

Hi, Can any one please explain me the use of 'typeset' in shell scripting? I donot under stand the use and advantages of using typeset. In one of our script, it is written like typeset VERBOSE NO_UPDATE typeset LOAD_SYBASE_TABLES I donot understand what actually these lines do. As per my... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

7. Shell Programming and Scripting

Why use typeset?

Hi, All the scripts we have here use typeset instead of normal variables. They don't have any parameters, they just get declared at the beginning of the scripts like this: typeset var1 var2 var3Could anyone tell me why this is done? I don't see the advantage in this over using normal variables. (1 Reply)
Discussion started by: Subbeh
1 Replies

8. Shell Programming and Scripting

Typeset command issue

Hi, As per my understanding typeset wil lmake a variable constant or readonly and -i option will make a variable integer. But please see the below outputs typeset -i abc=000001;echo $abc 1 typeset -i abc=0000010;echo $abc 8 typeset -i abc=00000100;echo $abc 64 typeset -i... (3 Replies)
Discussion started by: ratheeshjulk
3 Replies

9. Linux

Issue with typeset in Linux

Hi All, typeset -Z4 curtime command is giving different result than expected inside scripts in linux.But it gives expected results outside the scripts.Can you please help us ---------- Post updated at 05:37 AM ---------- Previous update was at 05:25 AM ---------- curTime=`date +%H%M`... (5 Replies)
Discussion started by: sumqwe
5 Replies

10. Shell Programming and Scripting

Typeset

I don't have man typeset entry in unix. what is the use of typeset command and can you give some examples for that. (1 Reply)
Discussion started by: ramkumar15
1 Replies
DRACUT.BOOTUP(7)						      dracut							  DRACUT.BOOTUP(7)

NAME
dracut.bootup - boot ordering in the initramfs DESCRIPTION
This flow chart illustrates the ordering of the services, if systemd is used in the dracut initramfs. systemd-journal.socket | v dracut-cmdline.service | v dracut-pre-udev.service | v systemd-udevd.service | v local-fs-pre.target dracut-pre-trigger.service | | v v (various mounts) (various swap systemd-udev-trigger.service | devices...) | (various low-level (various low-level | | | services: seed, API VFS mounts: v v v tmpfiles, random mqueue, configfs, local-fs.target swap.target dracut-initqueue.service sysctl, ...) debugfs, ...) | | | | | \_______________|____________________ | ___________________|____________________/ |/ v sysinit.target | _________________/|\___________________ / | | | | v | v (various | rescue.service sockets...) | | | | v v | rescue.target sockets.target | | | \_________________ | emergency.service | | v v basic.target emergency.target | ______________________/| / | | v | dracut-pre-mount.service | | | v | sysroot.mount | | | v | initrd-root-fs.target (custom initrd services) | | v | dracut-mount.service | | | v | initrd-parse-etc.service | | | v | (sysroot-usr.mount and | various mounts marked | with fstab option | x-initrd.mount) | | | v | initrd-fs.target \______________________ | | v initrd.target | v dracut-pre-pivot.service | v initrd-cleanup.service isolates to initrd-switch-root.target | v ______________________/| / | | initrd-udevadm-cleanup-db.service | | (custom initrd services) | | | \______________________ | | v initrd-switch-root.target | v initrd-switch-root.service | v switch-root AUTHOR
Harald Hoyer SEE ALSO
dracut(8) bootup(7) dracut 06/12/2014 DRACUT.BOOTUP(7)
All times are GMT -4. The time now is 02:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy