03-27-2018
Hi rovf ,
Thanks for your reply
My basic concern was to rewrite this command in linux shell script
IF "%EnvName%"=="DEV" (
echo This is Dev
for /f "tokens=2 delims=^=" %%l in ('findstr "Server_%EnvName%" "%~dp0%configFilePath%"') do (
)
This is what i tried writing
if [$EnvName:==:"DEV"]; then
echo This is DEV environment
for -f "tokens=2 delims=^= A in ('findstr "Server_$EnvName" "$path$configFilePath"')";do
set serv=!serv!$A
echo "Server Name !serv!"
done
fi
but I am getting syntax error near unexpected token `"tokens=2 delims=^= A in ('findstr "Server_$EnvName" "$path$configFilePath"')"'
main.sh: line 43: `for -f "tokens=2 delims=^= A in ('findstr "Server_$EnvName" "$path$configFilePath"')";do '
Can you please sugegest
very new in Linux
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I like to start a korn job remotely, from windows. I tried REXEC and that is not what I want. Need help !!!! thanks (4 Replies)
Discussion started by: kyawlin
4 Replies
2. UNIX for Advanced & Expert Users
Hello,
Any inputs on the possibility of executing a shell script on unix box from Windows FTP
TIA (1 Reply)
Discussion started by: B2BIntegrator
1 Replies
3. Shell Programming and Scripting
i frequently have to open multiple putty windows to ssh into a unix server running HP-UX 11.23. Since i use some of the windows for dedicated processes i would like to rename them (the caption displayed in the titlebar) to something more convenient than the standard <Host>.<Server>.com
While... (4 Replies)
Discussion started by: orno
4 Replies
4. UNIX for Advanced & Expert Users
I need to execute a shell script kept in unix machine from windows. User id, password area available.
For eg.
There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS.
Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies
5. UNIX for Dummies Questions & Answers
I use windows and I wanted to know how I can use shell script in windows. I saw windows power shell but the commands they use seem to be different from those I know as a newbie. For example I wanted to change the permission of a file using chmod, but it doesn't recognise such a command. So I would... (12 Replies)
Discussion started by: #moveon
12 Replies
6. Shell Programming and Scripting
Hi,
When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script...
Script:
REM :: File Name : Refresh_OTL.bat
REM :: Parameters : %1 - Region
REM :: : %2 - Cube Type
REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have 9 different linux based servers and i am automating there healthcheckup by doing ssh and fetching deviations out of it in a single text file. I am doing so by using ssh keygen. I am done with the above part .
Now i want to ftp that text file to my windows XP desktop and i want to... (4 Replies)
Discussion started by: gemnian.g
4 Replies
8. Shell Programming and Scripting
Can anybody please help me on how to code for the below requirement:
I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies
9. Shell Programming and Scripting
Hi everyone,
I've below windows batch script which is used to filter the file contents line by line and assign the matched values to the variables in for loop.
for /F "tokens=1,3 delims=:" %%A in (%LOG_DIR%\PM_IS_workflow_status.log) do (
set "ATTR_NAME=%%A"
if /i "!ATTR_NAME!" EQU "Folder"... (1 Reply)
Discussion started by: Kathraji
1 Replies
10. Shell Programming and Scripting
Hi all,
I have a script has been writing for Unix or Linux. Now I want to run under Windows 10. is give me Error:
if:Badly formed number
How to fix this please help
*** This is a copy of a part of Script.
set absolute_gap = 0
if ($min_p_to_p != "" && $min_p_to_p != "N/A" && $min_p_to_t... (5 Replies)
Discussion started by: dovo
5 Replies
LEARN ABOUT DEBIAN
afslog
AFSLOG(1) BSD General Commands Manual AFSLOG(1)
NAME
afslog -- obtain AFS tokens
SYNOPSIS
afslog [-h | --help] [--no-v4] [--no-v5] [-u | --unlog] [-v | --verbose] [--version] [-c cell | --cell=cell] [-k realm | --realm=realm] [-P
principal | --principal=principal] [-p path | --file=path] [cell | path ...]
DESCRIPTION
afslog obtains AFS tokens for a number of cells. What cells to get tokens for can either be specified as an explicit list, as file paths to
get tokens for, or be left unspecified, in which case afslog will use whatever magic krb_afslog(3) decides upon.
Supported options:
--no-v4
This makes afslog not try using Kerberos 4.
--no-v5
This makes afslog not try using Kerberos 5.
-P principal, --principal principal
select what Kerberos 5 principal to use.
--cache cache
select what Kerberos 5 credential cache to use. --principal overrides this option.
-u, --unlog
Destroy tokens instead of obtaining new. If this is specified, all other options are ignored (except for --help and --version).
-v, --verbose
Adds more verbosity for what is actually going on.
-c cell, --cell=cell
This specified one or more cell names to get tokens for.
-k realm, --realm=realm
This is the Kerberos realm the AFS servers live in, this should normally not be specified.
-p path, --file=path
This specified one or more file paths for which tokens should be obtained.
Instead of using -c and -p, you may also pass a list of cells and file paths after any other options. These arguments are considered files if
they are either the strings ``.'' or ``..'' or they contain a slash, or if there exists a file by that name.
EXAMPLES
Assuming that there is no file called ``openafs.org'' in the current directory, and that /afs/openafs.org points to that cell, the follwing
should be identical:
$ afslog -c openafs.org
$ afslog openafs.org
$ afslog /afs/openafs.org/some/file
SEE ALSO
krb_afslog(3)
HEIMDAL
November 26, 2002 HEIMDAL