01-11-2011
did you try by assigning to a variable?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have a problem with qwk command.
i have to check process status and for that i am using command
prstat -mvL 1 1
and it gives me the entire output
but when i use this command with awk like this:
prstat -mvL 1 1 | awk -F" " '{print $1,$15}'
to get first and 15th arguments.
... (3 Replies)
Discussion started by: usha rao
3 Replies
2. Shell Programming and Scripting
Hi All,
I am hoping someone can help me with some scripting I need to complete using AWK.
I'm trying to process multiple fixed files to generate one concatenated fixed file in a standard format.
The Input file is:-
aaaa bbbbb ccccc 1 xxxx aaa bbb
aaaa bbbbb ccccc 2 abcd aaa CCC... (9 Replies)
Discussion started by: jason_v_brown
9 Replies
3. Shell Programming and Scripting
Hi Gurus,
I need a suggestion, please help. I have a input file as below :
abc.txt :
*
xxxx: 00000
xxxxx: 00000
xxxx: RANDOM
xxx: RANDOM
**************************xxxxxxx***
* abc
******************************
abc:
abc: ... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
4. Shell Programming and Scripting
Hi...Does anyone know how to input huge file about 25 GB to awk
if single file then this works
awk '{print}' <hugefile
suppose if have to use something like this
awk FNR==NR{x=$0;next}{print $0,x}' hugefile1 hugefile2
then how to redirect ? and is there any provision to assign memory... (12 Replies)
Discussion started by: Akshay Hegde
12 Replies
5. Shell Programming and Scripting
Hi All,
Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab.
Cat my.awk
#!/bin/awk -f
function test(var){
some code}
{
}
END
{
print"test code"
} (5 Replies)
Discussion started by: random_thoughts
5 Replies
6. UNIX for Dummies Questions & Answers
I have one input file ABC.txt and one output DEF.txt. After the ABC is processed and created output, I want to rename ABC.txt to ABC.orig and DEF to ABC.txt. Currently when I am doing this, it does not process the input file as it cannot read and write to the same file. How can I achieve this?
... (12 Replies)
Discussion started by: High-T
12 Replies
7. Shell Programming and Scripting
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
8. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
9. Shell Programming and Scripting
Field1=””
Field2=””
Field3=””
Field4=””
Field5=””
USER INPUT UP TO 5 FIELDS
awk -F , '{ if ( $3 == Field1 && $6 == Field2 && $8 == Field3 && $9 == Field4 && $10 == Field5) print $0 }' /tmp/rodney.outD
INPUT FILE (Rodney.outD):
... (3 Replies)
Discussion started by: rmerrird
3 Replies
10. UNIX for Beginners Questions & Answers
cat filename| awk '{ $1=""; print $0}'
in my file there are few lines that has more than 3000 characters per line and as soon as I run the above command it cores, strings core reveals that the awk is failing because input string too long, limit. can i get some help from the experts to find... (8 Replies)
Discussion started by: knijjar
8 Replies
LEARN ABOUT DEBIAN
tai64n
tai64n(8) System Manager's Manual tai64n(8)
NAME
tai64n - puts a precise timestamp on each line.
SYNOPSIS
tai64n
DESCRIPTION
tai64n reads lines from stdin. For each line, it writes
1 an @,
2. a precise timestamp,
3. a space, and
4. a copy of the input line
to stdout. The timestamp indicates the moment that tai64n read the first character of the line.
tai64n does not allocate any memory after it starts.
TIMESTAMPS
Timestamps used by tai64n are 12-byte TAI64N labels in external TAI64N format, printed as 24 lowercase hexadecimal characters. You can use
tai64nlocal(8) to convert the timestamps to a human-readable format.
For example, the timestamp 4000000037c219bf2ef02e94 refers to the nanosecond beginning exactly 935467455.787492500 seconds after the begin-
ning of 1970 TAI; 37c219bf hexadecimal is 935467455, and 2ef02e94 hexadecimal is 787492500.
The current implementation of tai64n relies on the UNIX gettimeofday library routine to return the current time as the number of TAI sec-
onds since 1970-01-01 00:00:10 TAI. Beware that most gettimeofday implementations are not Y2038-compliant. Furthermore, most clocks are not
set accurately.
EXIT CODES
tai64n exits 0 when it sees end of input. It exits 111 without an error message if it has trouble reading stdin or writing stdout.
SEE ALSO
supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64nlocal(8),
setuidgid(8), envuidgid(8), envdir(8), softlimit(8), setlock(8)
http://cr.yp.to/daemontools.html
tai64n(8)