I'm an intern at a company that recently bought out another business. In doing so, they inherited a unix system that contains files which they need to retrieve. No one in the company, including myself, really understands or knows unix so please respond with the true assumption that I'm a unix... (1 Reply)
Can somebody explain it to me that why wc gives more chars suppose
Ab.txt have two lines
qwer
qasd
then wc -c ab.txt will give 10.why not 8.okay may be it is taking count one for each line just in case but why echo "qwer"|wc -C gives 5.
Ok with \c it is returning 4. :) (6 Replies)
Hello all,
I am trying to delete all the lines in a particular file having a pattern. The problem is that it has special characters and for some reason is not doing the job.
For eg.
src_file
/home/test/filelist.txt :xxxx:ogog
/home/test/RCH/ogogogg
/home/test/RYHUJ/HHHH... (3 Replies)
Good day, everyone!
Could anybody explain me the following situation.
If I'm running similar script:
Var="anna.kurnikova"
Var2="Anna Kurn"
echo $Var | tr -t "$Var" "$Var2"
Why the output is :
anna KurniKova
instead of Anna Kurnikova?
:confused:
Thank you in advance for any... (2 Replies)
I come across an entry in cron which is in such:
0 * * * *
What is the first 0 indicating? 0 minute? meaning a script cron as such will run every minute? :confused: (2 Replies)
See code below. It appears that i and j inhabit the same address yet hold different values. Can anyone shed light on this?
int main() {
const int i= 3;
int* j = const_cast<int*>(&i);
*j = 5;
cout << j << endl << &i << endl;
cout << *j << endl << i;
} (4 Replies)
Hello All,
I have a problem in counting number of process getting run with my current script name..
Here it is
ps -ef | grep $0 | grep -v grep
This display just one line with the PID, PPID and other details when i print it in the script.
But when I want to count the numbers in my... (11 Replies)
Hi folks,
If a declare a direct hash , then the hash element works fine.
my %test = ("test",1);
print %test;
print "\n";
Here in the above, the name of the hash is predeclared...
Suppose now I need to create the hash elements dynamically in the for loop.
$test="hash";
my... (1 Reply)
#!/bin/bash
PH=(KD 6S TC 3D) #playerhand
TCIP=(AH) #topcard in play
A=( "${TCIP::1}" ) # A
B=( "${TCIP:1}" ) # H
C=8
for e in ${PH}; do
if ]; then
echo "$e " >> /home/cogiz/validcards.txt
else
echo... (1 Reply)
Discussion started by: cogiz
1 Replies
LEARN ABOUT MINIX
ev
EV(1) General Commands Manual EV(1)NAME
ev - evaluate expressions
SYNOPSIS
ev 'expr' ..
DESCRIPTION
Ev evaluates expressions given on the command line, and sends the results to the standard output, one per line. An expression contains
real numbers, function calls, and the following operators:
+ - * / ^
Operators are evaluated left to right, except '^', which is right associative. Powers have the highest precedence; multiplication and
division are evaluated before addition and subtraction. Expressions can be grouped with parentheses. All values are double precision
real.
The following library of functions is available:
if(cond, then, else)
if cond is greater than zero, then is evaluated, otherwise else is evaluated.
select(N, a1, a2, ..)
return aN (N is rounded to the nearest integer). If N is zero, the number of available arguments is returned.
rand(x) compute a random number between 0 and 1 based on x.
floor(x) return largest integer not greater than x.
ceil(x) return smallest integer not less than x.
sqrt(x) return square root of x.
exp(x) compute e to the power of x (e approx = 2.718281828).
log(x) compute the logarithm of x to the base e.
log10(x) compute the logarithm of x to the base 10.
sin(x), cos(x), tan(x)
trigonometric functions.
asin(x), acos(x), atan(x)
inverse trigonometric functions.
atan2(y, x)
inverse tangent of y/x (range -pi to pi).
EXAMPLE
To pass the square root of two and the sine of .5 to a program:
program `ev 'sqrt(2)' 'sin(.5)'`
AUTHOR
Greg Ward
SEE ALSO icalc(1), rcalc(1)RADIANCE 10/28/96 EV(1)