10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/bin/sh
if
then
echo "Insufficient number of arguments ">> error".log" ;
echo "Please check error log for more details";
exit 1 ;
else
file_name=$1".csv";
fi ;
in_par_number=`head -n1 $file_name | sed 's///g' | wc -c`
read -a arr <<< `head -n1 $file_name | sed 's// /g'`
... (6 Replies)
Discussion started by: JayDoshi
6 Replies
2. Shell Programming and Scripting
I have a small program which needs to pass variable dynamically to form the name of a second variable whose value wil be passed on to a third variable.
***************** Program Start ******************
LOC1=/loc1
PAT1IN=/loc2
PAT2IN=/loc3
if ; then
for fpattern in `cat... (5 Replies)
Discussion started by: Cyril Jos
5 Replies
3. Shell Programming and Scripting
I am attempting to create a script that would allow me to list all the instances associated with a DB2 and then prompt the user to choose which one to issue the db2profile command against. I use the db2 command db2ilist to get a list of the instances for a particular server, but the number of... (7 Replies)
Discussion started by: slatoms
7 Replies
4. Red Hat
I am attempting to create a script that would allow me to list all the instances associated with a DB2 and then prompt the user to choose which one to issue the db2profile command against. I use the db2 command db2ilist to get a list of the instances for a particular server, but the number of... (1 Reply)
Discussion started by: slatoms
1 Replies
5. Shell Programming and Scripting
Hi guys.
i have a requirment as below.
I have a scripts which perform for loop
for i in /backup/logs -- it will give all the logs file
SC_RIO_RWVM_20120413064217303.LOG
SC_RIO_RWXM_20120413064225493.LOG
SC_RIO_RXXM_20120413064233273.LOG
...
do
open script.sh ---- in this file... (3 Replies)
Discussion started by: guddu_12
3 Replies
6. Shell Programming and Scripting
I need some variable help
TEMP1=Jane
TEMP2=Sue
X=1
eval USER=TEMP${X}
echo $USER
This gives output USER1
I would like to get Jane
I have tried
eval USER='TEMP${X}'
eval USER="TEMP${X}"
eval USER=`TEMP${X}` (3 Replies)
Discussion started by: Jotne
3 Replies
7. Shell Programming and Scripting
I found one post in another site with a solution for my problem
the below solution should explain what I want.
#!/bin/sh
first="one"
second="two"
third="three"
myvar="first"
echo ${!myvar}
But this gives error 'bad substitution'
System info
SunOS sundev2 5.9... (3 Replies)
Discussion started by: johnbach
3 Replies
8. UNIX for Advanced & Expert Users
This my script
ls *.ksh
ls *.ksh > a.txt
i=1
cat "a.txt" | while read a
do
if
then
echo "abc"
echo "abc" > m.ksh
echo "m.ksh" >> a.txt
i=2
fi
echo $a
done
ls *.ksh
--------------------------
My Output is
a.ksh - > first ls *.ksh (1 Reply)
Discussion started by: kingganesh04
1 Replies
9. Shell Programming and Scripting
HI
I want to create a date folder and then a log file under it, which will hold all output of shell script. Say shell script abc.sh runs every day and I want to redirect the output of abc.sh > /opt/bea/wls81/Pkmtest/$(date +%Y%m%d)/ant.log.
Here date should always change according to system... (2 Replies)
Discussion started by: pankajkrmishra
2 Replies
10. Shell Programming and Scripting
I want to define a variable like this. Can i declare such type?
I have already define this, but error is displaying sysntax error. So tell me what will be the write.
int create_mailfile(int,char*,char*,char*,char*,char*,char*); (1 Reply)
Discussion started by: debasis.mishra
1 Replies