Tag Archives: Username Password

Can anybody change this into Linux shell scripts?

By monisha

Code:

@echo off

SET "p0=%~0"
SET "p1=%~1"
SET "p2=%~2"
SET "p3=%~3"
SET "p4=%~4"
SET "p5=%~5"
SET "p6=%~6"
SET "p7=%~7"
SET "p8=%~8"
SET "p9=%~9"
SHIFT
SET "p10=%~9"
SHIFT
SET "p11=%~9"

SET "zip_path=D:OraOutputinterco%p10%"

echo Program Name : %p0%
rem echo "Next param : %p1%
echo Next param : Username/Password
echo User Id : %p2%
echo User Name : %p3%
echo Request ID : %p4%
echo File Name : %p5%
echo Entity Name : %p6%
echo Email Address : %p7%
echo Extract ID : %p8%
echo path name : %p9%
echo share directory : %p10%
echo Master Request ID : %p11%

rm !(D:tempXX.txt)

echo Process and Mail Output files
echo %zip_path%
IF NOT EXIST D:OraOutputinterco%p10%out%p11% GOTO MAPERROR
cd D:OraOutputinterco%p10%out%p11%
echo changed to D:OraOutputinterco%p10%out%p11%
IF EXIST D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip rm D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip
zip -j D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip D:OraOutputinterco%p10%out%p11%*.*
echo after zip
IF NOT EXIST D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip GOTO ENDPROCESS
echo zip file exists after zip
REM rm D:OraOutputinterco%p10%chello_interco*.*
echo Before Mail to %p7%
D:OraOutputintercoes.exe %p7% "Chello Interco Extract has completed" "Please find attached the compressed Intercompany spreadsheets" D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip
echo After Mail to %p7%
rm D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip
GOTO ENDPROCESS
:MAPERROR<br ...read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Kindly help me out to convert this script to shell script.

By Ganesh1985

[code]
set +v
echo “Program Name :” $0
# echo “Next param :” $1
echo “Next param :” “Username/Password”
echo “User Id :” $2
echo “User Name :” $3
echo “Request ID :” $4
echo “Original File Name :” $5
echo “Interface File Name :” $6
echo “Path Name :” $7
echo “Destination Path :” $8

cd $7
echo “Process Output files”
if [ ! –d “$8 ]; then
echo “The Share Directory has not been mapped. Contact your System Administrator
exit 1
else
if [ –d “$5 ]; then
cp $5 $8/$6
else
echo “Output file does not exist”
echo “Process finished. Goodbye”
fi
fi

[code]

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

HI! Can anybody change this into Linux shell scripts

By monisha

Code:

@echo off

SET "p0=%~0"
SET "p1=%~1"
SET "p2=%~2"
SET "p3=%~3"
SET "p4=%~4"
SET "p5=%~5"
SET "p6=%~6"
SET "p7=%~7"
SET "p8=%~8"
SET "p9=%~9"
SHIFT
SET "p10=%~9"
SHIFT
SET "p11=%~9"

SET "zip_path=D:OraOutputinterco%p10%"

echo Program Name : %p0%
rem echo "Next param : %p1%
echo Next param : Username/Password
echo User Id : %p2%
echo User Name : %p3%
echo Request ID : %p4%
echo File Name : %p5%
echo Entity Name : %p6%
echo Email Address : %p7%
echo Extract ID : %p8%
echo path name : %p9%
echo share directory : %p10%
echo Master Request ID : %p11%

rm !(D:tempXX.txt)

echo Process and Mail Output files
echo %zip_path%
IF NOT EXIST D:OraOutputinterco%p10%out%p11% GOTO MAPERROR
cd D:OraOutputinterco%p10%out%p11%
echo changed to D:OraOutputinterco%p10%out%p11%
IF EXIST D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip rm D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip
zip -j D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip D:OraOutputinterco%p10%out%p11%*.*
echo after zip
IF NOT EXIST D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip GOTO ENDPROCESS
echo zip file exists after zip
REM rm D:OraOutputinterco%p10%chello_interco*.*
echo Before Mail to %p7%
D:OraOutputintercoes.exe %p7% "Chello Interco Extract has completed" "Please find attached the compressed Intercompany spreadsheets" D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip
echo After Mail to %p7%
rm D:OraOutputinterco%p10%out%p11%chello_compressed_interco_files.zip
GOTO ENDPROCESS
:MAPERROR<br ...read more
Source: FULL ARTICLE at The UNIX and Linux Forums