10-09-2009
The code suggests a space is required at the start.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can anyone explain to me why the first line doesn't work and the second seems to work fine. I am trying to find all occurances of text within a certain column (col 13) that start with the character V, I suppose it sounds simple but I have tried using the following but don't really understand what... (2 Replies)
Discussion started by: Gerry405
2 Replies
2. Shell Programming and Scripting
hi,
i have the command nawk -v i want to use it equivalent in awk?
any help please
:) (2 Replies)
Discussion started by: kamel.seg
2 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I can run the following script using nawk..However, I find that teh server dun support nawk.. May I know how to change teh script to use awk such that it will work? Very urgent.. thx!
nawk 'BEGIN {FS=OFS=","}
NR==FNR{arr=$2;next}
$0 !~ "Documentation"{print $0;next} ... (2 Replies)
Discussion started by: kinmak
2 Replies
4. Shell Programming and Scripting
i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)
Discussion started by: saniya
5 Replies
5. Shell Programming and Scripting
Hello All
Please I have got a file called DATE.tex which consist of
01-04-2008_12:00:00
01-04-2005_12:00:00
01-04-2003_12:00:00
01-04-2007_12:00:00
01-04-2002_12:00:00
01-04-2009_12:00:00
I want to use nawk to print out the dates >=01-04-2009_12:00:00
I tried this
cat plnt.new |... (6 Replies)
Discussion started by: ganiel24
6 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone,
i am new to unix , so i want to know what is the use of awk and nawk.
because in most of the place this cmds were used.
so, if anyone provied the basic idea of this cmds, it will be much helpfull for me . . ..
Thnks in Advance :) (9 Replies)
Discussion started by: natraj005
9 Replies
7. Shell Programming and Scripting
I am trying to use either awk or nawk in ksh88 to grep the word "Reason" in multiple files and than print the lines that say "Reason" in a particular format that is different from how they would normally print. The original input is as follows:
... (10 Replies)
Discussion started by: ther2000
10 Replies
8. Shell Programming and Scripting
Hi Guys,
I am in need of some help; I have an xml message file which contains personal details as shown below:
, message=, message=, message=, message=, message=, message=
I want to use nawk to parse these xml messages but I am new to awk and nawk.
What I want is to get output... (7 Replies)
Discussion started by: James_Owen
7 Replies
9. Shell Programming and Scripting
I have 10 scripts which use awk/nawk extensively.
I have to always change awk to nawk and nawk to awk when i deploy all my scripts to different types of servers as some support nawk while other support awk.
Can you propose a solution that without having to tweak my 10 scripts at several... (8 Replies)
Discussion started by: mohtashims
8 Replies
LEARN ABOUT FREEBSD
primes
FACTOR(6) BSD Games Manual FACTOR(6)
NAME
factor, primes -- factor a number, generate primes
SYNOPSIS
factor [-h] [number ...]
primes [-h] [start [stop]]
DESCRIPTION
The factor utility will factor positive integers. When a number is factored, it is printed, followed by a ':', and the list of factors on a
single line. Factors are listed in ascending order, and are preceded by a space. If a factor divides a value more than once, it will be
printed more than once.
When factor is invoked with one or more arguments, each argument will be factored.
When factor is invoked with no arguments, factor reads numbers, one per line, from standard input, until end of file or error. Leading
white-space and empty lines are ignored. Numbers may be preceded by a single '+'. Numbers are terminated by a non-digit character (such as
a newline). After a number is read, it is factored.
The primes utility prints primes in ascending order, one per line, starting at or above start and continuing until, but not including stop.
The start value must be at least 0 and not greater than stop. The stop value must not be greater than the maximum. The default and maximum
value of stop is 3825123056546413050.
When the primes utility is invoked with no arguments, start is read from standard input and stop is taken to be the maximum. The start value
may be preceded by a single '+'. The start value is terminated by a non-digit character (such as a newline).
DIAGNOSTICS
negative numbers aren't permitted
illegal numeric format
start value must be less than stop value
Result too large
BUGS
factor cannot handle the ``10 most wanted'' factor list, primes will not get you a world record.
primes is unable to list primes between 3825123056546413050 and 18446744073709551615 since it relies on strong pseudoprime tests after siev-
ing, and nobody has proven how many strong pseudoprime tests are required to prove primality for integers larger than 3825123056546413050.
BSD
October 10, 2002 BSD