04-19-2016
10 More Discussions You Might Find Interesting
1. New to Unix. Which books should I read?
I'm just looking for really good unix book on programming in all shells, and system adminstrator books, and well as just all around really good books on unix.
I know the "Unix Shell Programming" book that Neo recommends I recently purchased that it is very good.
But when I heard that Neo has... (13 Replies)
Discussion started by: Astudent
13 Replies
2. UNIX for Dummies Questions & Answers
I'm just looking for really good unix book on programming in all shells, and system adminstrator books, and well as just all around really good books on unix.
I know the "Unix Shell Programming" book that Neo recommends I recently purchased that it is very good.
But when I heard that Neo has... (13 Replies)
Discussion started by: Astudent
13 Replies
3. UNIX for Dummies Questions & Answers
where can i find unix admnistration books to be downloaded i an using SCO openserver 5.0.4
also where can i download freely unix programmimg tutorials (1 Reply)
Discussion started by: dsrawat
1 Replies
4. Shell Programming and Scripting
Hai All
Iam looking for books in unix on shell scripting which has more stuff on how to run Oracle procedures or functions and the best methods to follow passing unix variables as parameters to Oracle.
Thanks in advance
Krishna (2 Replies)
Discussion started by: krishnasai
2 Replies
5. UNIX for Dummies Questions & Answers
hi forum,
i would like to learn Unix by myself and want to have some good knowlege ..is that possible ?which book can i follow?can anyone send me some book links ...
Thanks in advance. (2 Replies)
Discussion started by: Vyra
2 Replies
6. UNIX for Dummies Questions & Answers
Am new to this unix concept..i want to learn unix ..could anyone give link or free e-book to study and understand Unix fundamentals.. (6 Replies)
Discussion started by: Vyra
6 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies
8. Shell Programming and Scripting
hello....
iam need more books about programming shell by c & c++ ...
please iam need it now
thank you:) (2 Replies)
Discussion started by: osamasam
2 Replies
9. Programming
I have a file called dvwl.c, and I am running it on a putty (unix server) using:
gcc -Wall -g -o mycode dvwl.c
./mycode 1 /usr/share/dict/words s
What it does is, it opens up words (since i gave that path) and reads the lines skipping the first line (since it says 1, if i put here 3, then it... (1 Reply)
Discussion started by: omega666
1 Replies
10. UNIX for Dummies Questions & Answers
How does unix system administration, unix programming, unix network programming differ?
Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies
LEARN ABOUT DEBIAN
plan9-hoc
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)