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
GENISOIMAGERC(5)						File Formats Manual						  GENISOIMAGERC(5)

NAME
genisoimagerc - startup configuration file for genisoimage DESCRIPTION
genisoimage(1) searches for a configuration file in several places; it uses the first one it is able to open. First, if the GENISOIMAGERC environment variable is set, its value is used as the filename; likewise for the MKISOFSRC environment variable. Next, genisoimage looks for files named .genisoimagerc or .mkisofsrc, first in the current working directory, then in the user's home directory. Next, it looks for /etc/genisoimagerc. Finally, it looks for a .genisoimagerc in the same directory as genisoimage itself is stored. The .genisoimagerc file contains lines of the form TAG=value where TAG is one of the settings defined below. The case of the tag is not significant. All settings have command-line equivalents; if the command-line parameter is specified, it takes priority over the configuration file. Blank lines and lines beginning with `#' are ignored. CONFIGURATION SETTINGS
ABST The abstract information, typically the name of a file on the disc containing an abstract. There is space for 37 characters. Equivalent to the -abstract command-line option. APPI The application identifier should describe the application that will be on the disc. There is space for 128 characters. Equivalent to the -A command-line option. BIBL The bibliographic information, often the name of a file on the disc containing a bibliography. There is space for 37 characters. Equivalent to the -biblio command-line option. COPY The copyright information, typically the name of a file on the disc containing the copyright notice. There is space for 37 charac- ters. Equivalent to the -copyright command-line option. HFS_TYPE The default TYPE for Macintosh files. Must be exactly 4 characters. Equivalent to the -hfs-type command-line option. The default value is TEXT. HFS_CREATOR The default CREATOR for Macintosh files. Must be exactly 4 characters. Equivalent to the -hfs-creator command-line option. The default value is Unix. PREP This should describe the preparer of the CD-ROM, usually with a mailing address and phone number. There is space for 128 charac- ters. Equivalent to the -p command-line option. PUBL This should describe the publisher of the CD-ROM, usually with a mailing address and phone number. There is space for 128 charac- ters. Equivalent to the -publisher command-line option. SYSI The System Identifier. There is space for 32 characters. Equivalent to the -sysid command-line option. VOLI The Volume Identifier. There is space for 32 characters. Equivalent to the -V command-line option. VOLS The Volume Set Name. There is space for 128 characters. Equivalent to the -volset command-line option. genisoimage can also be configured at compile time with defaults for many of these fields. See the file defaults.h. EXAMPLES
The following file COPY=src/COPYING SYSI=Multics 75 is equivalent to the genisoimage command-line parameters -copyright src/COPYING -sysid "Multics 75" SEE ALSO
genisoimage(1). AUTHORS
See the genisoimage(1) manual page for credits for the genisoimage program and documentation. 13 Dec 2006 GENISOIMAGERC(5)
All times are GMT -4. The time now is 07:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy