10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i want to do the following:
Grep the following kind of strings for the 15digit ID which is stored in filename1:
"14:06:51.396 INFO BMCREMEDYSD INPUT-ACTION Failed to retrieve Remedy Incident Modification record: 000000000039047 org.apache.axis2.AxisFault: Read timed out - complete... (9 Replies)
Discussion started by: Khushbu
9 Replies
2. Shell Programming and Scripting
I am piping some output to awk and would like to print fields $1 $2 and $3 $4 only if they exist.
Note the awk begins with awk '{print $NF " " since I want the last field printed first. (7 Replies)
Discussion started by: motdman
7 Replies
3. Shell Programming and Scripting
I am facing this weird issue where the script is working fine from the command line but when I am executing it from cron though it is working fine but the "if" loop is processing else part though I know that the if part of the logic is true and ideally the loop should execute the if portion.
... (3 Replies)
Discussion started by: sk2code
3 Replies
4. Shell Programming and Scripting
Here's my code:
awk -F '' 'NR==FNR {
if (/time/ && $5>10)
A=$2" "$3":"$4":"($5-01)
else if (/time/ && $5<01)
A=$2" "$3":"$4-01":"(59-$5)
else if (/time/ && $5<=10)
A=$2" "$3":"$4":0"($5-01)
else if (/close/) {
B=0
n1=n2;
... (2 Replies)
Discussion started by: klane
2 Replies
5. Shell Programming and Scripting
Hi frnds
I trying to execute the following ksh,
#!/bin/ksh
file=$OBS_APP_PATH/config/com/uhg/obs/inbound/configs/ServiceFeeDetail.xml
inputFileDir=$OBS_APP_PATH/config/com/uhg/obs/inbound/configs/
echo $file
echo $cntWrd
if
then
echo "Inside IF"
for i in 'ls -t1... (7 Replies)
Discussion started by: balesh
7 Replies
6. Shell Programming and Scripting
Hi,
I am executing below script
s1=`pwd`
s2=/space
if
then
echo "done"
else
echo "mistake"
cd /tmp
fi
I am not able to migrate to /tmp directory if the condition is not true.However mistake is being printed.Means cd command is not working here.All other commands except cd are... (3 Replies)
Discussion started by: d8011
3 Replies
7. Shell Programming and Scripting
Im unable to run scripts when i read each script thru a while loop. Is this way of execution thru while loop is wrong or is there any error in the script.
I get the following error msg and i use ksh.
./vftest.ksh: ./add.ksh -customer 4875 -dim RD,TRND,TT,HS,MRKT,PRDC,ACV,CV,FCT: not found
... (7 Replies)
Discussion started by: michaelrozar17
7 Replies
8. Shell Programming and Scripting
Hi all,
I am trying to run a script which is expected to do:
on the remote machine,
There are two directories /export/home/abc1,/export/home/abc2
i am trying to do,
ssh SERVERNAME "for i in `ls -l /export/home/abc*|awk '{print $9}'`; do cd $i; ls -l; done"
But its not working ,iam... (11 Replies)
Discussion started by: Jartan
11 Replies
9. Shell Programming and Scripting
I have a server that receives backup files from several servers. Each server has its own directory to scp their files into, some of the files are received as .tar files and need to be compressed before being dumped. When the scp of the tar file is complete a file named 'flag' is also sent to... (2 Replies)
Discussion started by: thumper
2 Replies
10. Shell Programming and Scripting
Hello Guys,
Well, using shell script, I'm doing loop on DB query as below:
isql -Usa -Ptest -I /opt/sybase/interfaces << EOF
use testdb
go
declare @i int
select @i = 1
while(@i <= 5)
begin
Insert into TEST values (@i,"Test","TestDesc")
select @i = @i + 1
end
go
EOF
The Issue... (2 Replies)
Discussion started by: Alaeddin
2 Replies