Sponsored Content
Top Forums UNIX for Advanced & Expert Users Equivalent command for setlocal in Unix Post 302116245 by kahuna on Wednesday 2nd of May 2007 02:21:40 PM
Old 05-02-2007
Looking at the Microsoft documentation

Setlocal creates a local scope and endlocal terminates the local scope. Any changes made within the setlocal and endlocal scope are discarded, thereby leaving the original environment unchanged. You can nest these two commands to a maximum of 32 levels. For more information about the setlocal and endlocal commands, see Setlocal and Endlocal

I think the closest equivalent effect can be created by spawning a subshell using ( ... ).
Code:
$ cat a.sh
A=OUTER
echo $A
(
A=INNER
echo $A
)
echo $A
$ ksh a.sh
OUTER
INNER
OUTER

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Equivalent unix command to minimize/maximize xterm window

To all experts, I need some advice on how I can enter a unix command which is equivalent to the action of minimizing/maximizing an active xterm window. How can I do this (i) when control is in the active xterm window to be minimized/maximized , & (ii) when control is in a xterm window which runs... (0 Replies)
Discussion started by: icemocha75
0 Replies

2. UNIX for Advanced & Expert Users

IsDBCSLeadByteEx equivalent for unix

I am using IsDBCSLeadByteEx for windows, i would like to know whether there is any equivalent function in unix(linux) platform. (1 Reply)
Discussion started by: anjan_kumar_k
1 Replies

3. Programming

IsDBCSLeadByteEx equivalent for unix

I am using IsDBCSLeadByteEx for windows, i would like to know whether there is any equivalent function in unix(linux) platform. (2 Replies)
Discussion started by: anjan_kumar_k
2 Replies

4. UNIX for Dummies Questions & Answers

Equivalent of Substr in Unix

Hi, I have a shell variable which has a value 123456:abcdeg. I want to extract the value which is present before ":". Is there any command in Unix through which I can achieve this. Please suggest. Thanks, Saurabh (7 Replies)
Discussion started by: saurabhsinha23
7 Replies

5. Shell Programming and Scripting

Windows command shell equivalent in Unix

In Windows we use cmd.exe \c as the command SHell What is its equivalent in UNIX ? Thanx for all your help. (10 Replies)
Discussion started by: simonsimon
10 Replies

6. Windows & DOS: Issues & Discussions

dos/intel unix command equivalent

In Unix I can use command line to do a find for files older than so many days and remove them. I can also capture the date to see if its a saturday and do something different. Are there any dos/intel command line equivalent commands to do this on a windows 2003 server? This is from an... (6 Replies)
Discussion started by: MizzGail
6 Replies

7. Shell Programming and Scripting

PHP Equivalent of the unix command

Hi Can any one please let me know which will be the PHP equivalent of the below Unix statement, curl -H "Content-type: application/json" -H "Accept: application/json" --data-binary '{"text" : "how to check the temperature?"}' -H "X-JaskUid:111" -X POST "www.google.com/res"'Thanks in advance!! ... (0 Replies)
Discussion started by: vidhyaS
0 Replies

8. AIX

smitty equivalent command line command

i know after you do something in smitty via the gui, you can click something in smitty that will show you how to do the same thing via the command line, (not using the gui) can anyone tell me how (2 Replies)
Discussion started by: asyed123
2 Replies

9. Windows & DOS: Issues & Discussions

DOS Equivalent of UNIX Command

Hi, The title of this post is a little vague but I couldn't think of what to call it. In Unix you can perform the following command ftp -v IPADDRESS <<END put FILE END In a DOS command prompt, is it possible to do the same kind of thing that the "<<END" does? So for example, ... (4 Replies)
Discussion started by: Ste_Moore01
4 Replies

10. Shell Programming and Scripting

Need Linux equivalent for UNIX

I have a folder called "log" which has a few sub-folders say "fda" "fd7" "fdd" "fd6 .... " I wish to fire the below command inside each subfolder starting with the folder with the latest time stamp. grep "$greptime.*exit" Prod.$(hostname).log | grep $fdrdate_new If the seach did not yield... (3 Replies)
Discussion started by: mohtashims
3 Replies
COLLATEINDEX(1) 						   DocBook DSSSL						   COLLATEINDEX(1)

NAME
collateindex.pl - generate DocBook index files SYNOPSIS
collateindex.pl [-f] [-g] [-i id] [-I scope] [-N] [-o file] [-p] [-P file] [-q] [-s name] [-S scope] [-t name] [-x] file DESCRIPTION
collateindex.pl creates index data for DocBook XML or SGML files. OPTIONS
-f Force the output file to be written, even if it appears to have been edited by hand. -g Group terms with IndexDiv based on the first letter of the term (or its SortAs attribute). (This might not handle all language envi- ronments.) -i id The ID to use for the <index> tag. -I scope The implied scope, must be "all", "local", or "global". IndexTerms which do not specify a scope will have the implied scope. If unspecified, "all" is assumed. -N New index (generates an empty index file). -o file Output to file. Defaults to stdout. -p Link to points in the document. The default is to link to the closest containing section. -P file Read a preamble from file. The contents of file will be inserted before the <index> tag. -q Run quietly. -s name Name the IndexDiv that contains symbols. The default is "Symbols". Meaningless if -g is not used. -S scope Scope of the index, must be "all", "local", or "global". If unspecified, "all" is assumed. -t name Title for the index. -x Make a SetIndex. -V Print version number and exit. file The file containing index data generated with the DocBook DSSSL HTML stylesheet (usually called HTML.index). EXAMPLE
collateindex.pl -o index.sgml HTML.index EXIT STATUS
0 Success 1 Failure AUTHOR
Norm Walsh <ndw@nwalsh.com> Minor updates by Adam Di Carlo <adam@onshore.com> and Peter Eisentraut <peter_e@gmx.net> docbook-dsssl 1.79 2004-11-04 COLLATEINDEX(1)
All times are GMT -4. The time now is 08:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy