Sponsored Content
Top Forums Shell Programming and Scripting Need Emergency help with script! Post 302358147 by dr.house on Thursday 1st of October 2009 12:13:34 PM
Old 10-01-2009
Ad hoc, I see 2 if but only 1 fi Smilie
 

8 More Discussions You Might Find Interesting

1. SCO

Emergency boot

I need to boot an OpenServer 5.0.5 server but I don't have emergency boot disks for it. There are some boot disks of other servers. Can I use these disks, changing defbootstr ?. How ?. The fact is that administrator can't login as root and it seems to be a corrupted auth system issue. Other... (2 Replies)
Discussion started by: dags
2 Replies

2. UNIX for Dummies Questions & Answers

Emergency Recovery Problems

Any help here whatsoever will be greatly appreciated! Running ScoUnix on IBMx235 server. LTO1 tape drive. Need to set up DR box. Disks installed/configured by IBM techie. On production server: Ran emergency_disk -d /tmp diskette1 and diskette2 successfully. Rean emergency_rec -e ctape1... (0 Replies)
Discussion started by: kwagga123
0 Replies

3. UNIX for Advanced & Expert Users

X development libraries!!! EMERGENCY!!!

checking for X... no configure: error: X development libraries not found I'm on a mac, trying to install GTK+. got the error above. could someone please let me know for x development libraries, what do i really need specifically???? this is sorta emergency because if i don't sort this out... (7 Replies)
Discussion started by: jingt86
7 Replies

4. UNIX for Advanced & Expert Users

emergency shutdown best practices.

Has anyone implemented or have suggestions on how to shutdown many remote unix/linux servers from a single script initiated from 1 server? I need this to execute in parallel as time is not on my side. Our ups is sadly underrated and will die in approximately 15 minutes. (There is not... (10 Replies)
Discussion started by: jsw371
10 Replies

5. Ubuntu

Emergency help with ubuntu

Hi guys i have some question about ubuntu(10.10) 1.what time scheduling & page replacement algorithm have been used in ubuntu 2.how to create a process 3.how to kill a process 4.how to send information to a process 5.how to see a process 6.how to increase priority of a process 7.how to... (1 Reply)
Discussion started by: mortez28
1 Replies

6. Shell Programming and Scripting

Emergency...!!! Shell Scripting.... How to start a same script in 3 different logins?

Hi, I've a shell script. If I trigger the script it takes one day to complete the execution. I've to start the same script in 3 different logins of Unix machine simultaneously. Do you have any idea how can I make it? Please suggest.:( Thank you.. (1 Reply)
Discussion started by: testin
1 Replies

7. Solaris

Emergency !!!Help Please--- NFS

Hi Guru's, I am unable to mount NFS share on unix system (DG/UX) which is nfs client. Error: mount: /nfsshare: Invalid argument mount: giving up on: /mountpoint i tried following commands mount -t nfs remotehost:/nfsshare /mountpoint Error: mount: /nfsshare: Invalid... (1 Reply)
Discussion started by: Justin John
1 Replies

8. Shell Programming and Scripting

UNIX emergency

can anyone please tell me that how can i boot unix from a cd? full procedure. it's an emergency. reply asap (1 Reply)
Discussion started by: niket agarwal
1 Replies
HOC(1)							      General Commands Manual							    HOC(1)

NAME
hoc - interactive floating point language SYNOPSIS
hoc [ file ... ] [ -e expression ] DESCRIPTION
Hoc interprets a simple language for floating point arithmetic, at about the level of BASIC, with C-like syntax and functions. The named files are read and interpreted in order. If no file is given or if file is hoc interprets the standard input. The -e option allows input to hoc to be specified on the command line, to be treated as if it appeared in a file. Hoc input consists of expressions and statements. Expressions are evaluated and their results printed. Statements, typically assignments and function or procedure definitions, produce no output unless they explicitly call print. Variable names have the usual syntax, including the name by itself contains the value of the last expression evaluated. The variables E, PI, PHI, GAMMA and DEG are predefined; the last is 59.25..., degrees per radian. Expressions are formed with these C-like operators, listed by decreasing precedence. ^ exponentiation ! - ++ -- * / % + - > >= < <= == != && || = += -= *= /= %= Built in functions are abs, acos, asin, atan (one argument), cos, cosh, exp, int, log, log10, sin, sinh, sqrt, tan, and tanh. The function read(x) reads a value into the variable x and returns 0 at EOF; the statement print prints a list of expressions that may include string constants such as "hello ". Control flow statements are if-else, while, and for, with braces for grouping. Newline ends a statement. Backslash-newline is equivalent to a space. Functions and procedures are introduced by the words func and proc; return is used to return with a value from a function. EXAMPLES
func gcd(a, b) { temp = abs(a) % abs(b) if(temp == 0) return abs(b) return gcd(b, temp) } for(i=1; i<12; i++) print gcd(i,12) SOURCE
/src/cmd/hoc SEE ALSO
bc(1), dc(1) B. W. Kernighan and R. Pike, The Unix Programming Environment, Prentice-Hall, 1984 BUGS
Error recovery is imperfect within function and procedure definitions. HOC(1)
All times are GMT -4. The time now is 05:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy