reccles
asked on
Equivalent command to Unix export paramfile=`cat /dir/dir/dir/paramlist.txt`
I am trying to replicate the following Unix command set to MS-DOS is there an equivalent in MS-DOS
Unix
export paramfile=`cat /dir/dir/dir/paramlist.txt `
..../dsjob -run $paramfile PROJECTNAME JOBNAME
MS-DOS that I have tried is
set paramfile='type c:\parameters.txt'
C:\...\dsjob.exe -run %paramfile% ...
Unix
export paramfile=`cat /dir/dir/dir/paramlist.txt
..../dsjob -run $paramfile PROJECTNAME JOBNAME
MS-DOS that I have tried is
set paramfile='type c:\parameters.txt'
C:\...\dsjob.exe -run %paramfile% ...
Translate the unix into englilsh (what you want to do) and we'll see if we can help. Otherwise, you may be waiting for someone who knows both well.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi GuruGary,
Actually, if they are in the "declare -x" format, then you could still use your FOR /F idea. You'd just have to modify it a bit:
FOR /F "TOKENS=2*" %%F IN (parameters.txt) DO (SET %%G)
This will use space as the delimeter to skip "declare", place "-x" into %%F which we then ignore. Then the rest of the line goes into %%G to include spaces if needed.
pb
Actually, if they are in the "declare -x" format, then you could still use your FOR /F idea. You'd just have to modify it a bit:
FOR /F "TOKENS=2*" %%F IN (parameters.txt) DO (SET %%G)
This will use space as the delimeter to skip "declare", place "-x" into %%F which we then ignore. Then the rest of the line goes into %%G to include spaces if needed.
pb
Hi Sirbounty,
Long time, no see. My fault entirely.
I just suggested a minor modification to GuruGary's idea. All points should be awarded to him.
pb
Long time, no see. My fault entirely.
I just suggested a minor modification to GuruGary's idea. All points should be awarded to him.
pb
Well thanks, pb! No objections to that from me.