Search Results

Search: Posts Made By: donadarsh
1,487
Posted By donadarsh
./script.sh param1 param2 param3 .... paramN in...
./script.sh param1 param2 param3 .... paramN
in script.sh

parameters=$*

for param in $parameters
do
echo $param
done
1,338
Posted By donadarsh
PASS=Figomom#0;export PASS is password that is...
PASS=Figomom#0;export PASS is password that is getting used to connect to database. Once you set the password you need to export it as environment variable. So whenever you need you can use it.

if...
2,233
Posted By donadarsh
have you added the first line to tell which shell...
have you added the first line to tell which shell you are running? like
#!/bin/sh
1,988
Posted By donadarsh
better write a SQL script which will have all...
better write a SQL script which will have all steps to shutdown DB. Pass your necessary information as argument to script and execute it from ksh file in silent mode.
like -


inside ksh file...
2,542
Posted By donadarsh
try it this way. capture the process id of sub...
try it this way.
capture the process id of sub process and keep checking for completion in a loop after some interval.

wrapper.ksh
########################
#!/bin/ksh

nohup ./pii_insert.ksh...
5,529
Posted By donadarsh
total_rec=`wc -l $file` #subtract 1 for header...
total_rec=`wc -l $file`
#subtract 1 for header record
total_rec=`expr $total_rec - 1`
#put the header record first in output file
head -1 $file > somefile
#sort based on first filed except...
3,101
Posted By donadarsh
echo "Jennifer Jones (student)...
echo "Jennifer Jones (student) \"id:376765748587/7465674775\" NewYork"|cut -d"\"" -f2
949
Posted By donadarsh
newstr=`echo "part=gfjhwhedaqh=ghdgwg^*^(G=="|cut...
newstr=`echo "part=gfjhwhedaqh=ghdgwg^*^(G=="|cut -d"=" -f2-`
1,379
Posted By donadarsh
try to put variable in double quotes - ...
try to put variable in double quotes -

stringtocheck=("$line")
echo "$stringtocheck"
14,402
Posted By donadarsh
If you want to calculate percentage by using one...
If you want to calculate percentage by using one expression, use -

echo "Percentage% =" `expr \( \( 8500 - 8000 \) \* 100 \) / 2000`"%"
12,662
Posted By donadarsh
first put the contents of file in a temp file...
first put the contents of file in a temp file with trimming the space then try to search the pattern, words will be separated by max 1 space.


cat file_name|tr -s " " >temp_file
9,201
Posted By donadarsh
it will come like that only because is has space...
it will come like that only because is has space between that field. either separate that file with valid separator or use double quotes for the last field.

another way you can do is -

store...
Forum: Solaris 08-11-2011
4,967
Posted By donadarsh
use expr
i=0
i=`expr $i + 1`


don't use blank space while assigning some value to a variable.
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 09:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy