10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i want use this Comand for my psql request
sh ssh -o StrictHostKeyChecking=no rootatemailaddress.de sudo psql -U postgres -c "select pg_terminate_backend(pid) from pg_stat_activity where datnam=\'$DB\';"'"
but the shell lost the inverted comma for datnam=\'$DB\'. The request deliver... (2 Replies)
Discussion started by: peterpane007
2 Replies
2. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi,
The problem statement is: I am trying to read line by line from a flat file by using a while loop. The... (9 Replies)
Discussion started by: Sandeep Pattnai
9 Replies
3. Shell Programming and Scripting
I have this XML file -
<gp>
<mms>1110012</mms>
<tg>988</tg>
<mm>LongTime</mm>
<lv>
<lkid>StartEle=ONE, Desti = Motion</lkid>
<kk>12</kk>
</lv>
<lv>
<lkid>StartEle=ONE, Source = Velocity</lkid>
<kk>2</kk>
</lv>
<lv>
... (3 Replies)
Discussion started by: NeedASolution
3 Replies
4. Shell Programming and Scripting
hi I keep getting an error with this nested if statement and am getting the error unexpected end of file, can anyone help me as to why this wont execute?
#!/bin/bash
#script to check wether the -i -v statements run correctly
removeFile ()
{
mv $1 $HOME/deleted
}... (3 Replies)
Discussion started by: somersetdan
3 Replies
5. Shell Programming and Scripting
Please tell me how to nest logical expressions in bash. I would like to nest logical expressions for arguments of the "test" command on bash.
The following pseudo-code shows my intention.
// pseudo code
if (exp1 AND (exp2 OR exp3))
{
Output true;
}
else
{
Output false;
}
... (11 Replies)
Discussion started by: LessNux
11 Replies
6. UNIX for Dummies Questions & Answers
how to use nested ifs in unix (1 Reply)
Discussion started by: pratima.kumari
1 Replies
7. Shell Programming and Scripting
Hi,
Would someone know if I can fire nested sql queries in a shell script? Basically what I am trying to do is as follows:
my_sql=$(sqlplus -s /nolog<<EOF|sed -e "s/Connected. *//g"
connect... (2 Replies)
Discussion started by: shrutihardas
2 Replies
8. Shell Programming and Scripting
I am scripting in tcsh and here is what I currently have:
foreach group (g1 g2 g3 g4)
set ppl = `cat $group.file.with.list.of.ppl.in.row.format`
set label = 1
@ label += 1
foreach ppls ($ppl)
echo $label >> file
end
end
... (0 Replies)
Discussion started by: bonesy
0 Replies
9. Shell Programming and Scripting
#!/bin/sh
APP_ROOT_MODE1=/opt/app1.0
APP_ROOT_MODE2=/opt/app2.0
APP_ROOT=${APP_ROOT_${APP_MODE}}
# enviornment variable APP_MODE will be exported in the terminal where
# we run the applciation, its value is string - MODE1 or MODE2
# My intension is:
# when export APP_MODE=MODE1... (4 Replies)
Discussion started by: princelinux
4 Replies
10. Shell Programming and Scripting
What I thought was going to be very simple has turned out to be really lame, and so I come to you for help.
mountedon=`df -k /synctest | awk 'NR == 2 {print $1}'`
if
then
# mount /pupcl06
mountedon=`df -k /synctest | awk 'NR == 2 {print $1}'`
if
then
mailx -s... (2 Replies)
Discussion started by: ProFiction
2 Replies