The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
line 3: syntax error near unexpected token `(' camzio UNIX Desktop for Dummies Questions & Answers 4 09-29-2008 11:10 AM
interface_file_ff.sh[99]: syntax error at line 1 : `)' unexpected geekforu Shell Programming and Scripting 1 07-07-2008 02:54 AM
syntax error at line 59: `end of file' unexpected Remi SUN Solaris 4 01-16-2007 02:48 PM
syntax error at line 33: `elif` unexpected hazy UNIX for Dummies Questions & Answers 4 02-09-2006 02:51 PM
sh: syntax error at line 1: `>' unexpected atiato High Level Programming 2 03-16-2004 07:39 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-05-2008
rajashekar.y rajashekar.y is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 8
syntax error at line 28: `(' unexpected

hi can anyone pls look into this....shell script...

Pls find the error below:

> sh -n tmp
tmp: syntax error at line 28: `(' unexpected


isql -Usa -S$1 -P`grep $1 dbpassword|cut -d ":" -f3` -w2000 -b<<!
set nocount on
declare @i int
declare @dbname char(6)
declare @tmp int
if ($3="default")
set @i=3
else if ($3="log")
set @i=4
set @dbname="$2"
if (@dbname="tempdb")
begin
select @tmp=count(*) from sysusages where segmap!=7 and db_name(dbid)="$2"
if (@tmp <>(select count(*) from sysusages where db_name(dbid)="$2" and segmap=7))
begin
print "Pls use sp_extend segment to add $3 segment on the dev whose segmap!=7"
exit
end
else if(@tmp= 0)
begin
select "FREE SPACE: ",sum(curunreservedpgs(dbid,lstart,unreservedpgs)*(@@maxpagesize/(1024*1024))),
"Total Space: ",sum(size)/((1024*1024)/@@maxpagesize),"Server Name : ",@@servername from sysusages
where db_name(dbid)="$2" and segmap=7
end
end
go
!
select "FREE SPACE: ",sum(curunreservedpgs(dbid,lstart,unreservedpgs)*(@@maxpagesize/(1024*1024))),
"Total Space: ",sum(size)/((1024*1024)/@@maxpagesize),"Server Name : ",@@servername from sysusages
where db_name(dbid)="$2" and segmap=@i or segmap=7
go
select spid,cmd,physical_io,status from master..sysprocesses where cmd not like "AWA%"
go
!
isql -Usa -SCHI_DRUM_MONITOR -Ddba_database -Psy91base -w2000<<!
select top 20 yyyymmdd,allocated_to_db,unused_in_db,used_in_db from space_usage_history where
instname="$1" and db="$2" order by yyyymmdd desc
go
!
 

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0