![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|