05-06-2009
What is your exact requirement? What does the variable new_rec1_field hold? If it is refering to fields -$1, $2 etc. why can't it be directly use inside awk?
cheers,
Devaraj Takhellambam
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the follwing code:
awk '{print $1}' HITS #Searches HITS file column one. Column one is filenames
awk '{print $2}' HITS | sort -n | wc -l #Searches HITS file and sorts numerically and outputs line count. column 2 is IP addresses
awk... (4 Replies)
Discussion started by: amatuer_lee_3
4 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I'm facing an issue in my awk script.
The script is processing a large text file having the details of a number of persons, each person's details being written from 100 to 250 tags as given below:
100 START|
101klklk|
...
245 opr|
246 55|
250 END|
100 START|
...
245 pp|
246... (4 Replies)
Discussion started by: pgp_acc1
4 Replies
3. Shell Programming and Scripting
Hi,
I am currently using the sed and awk commands to filter a file that has multiple sets of data in different columns. An example of part of the file i am filtering is as follows;
Sat Oct 2 07:42:45 2010 01:33:46 R1_CAR_12.34
Sun Oct 3 13:09:53 2010 00:02:34 R2_BUS_56.78
Sun... (4 Replies)
Discussion started by: crunchie
4 Replies
4. UNIX for Dummies Questions & Answers
%%%%% (7 Replies)
Discussion started by: lucasvs
7 Replies
5. Shell Programming and Scripting
Hi,
I have an awk script(test.awk) as below which I am trying to execute through the following command and I am getting error as follows. Request your valid inputs on where I am going wrong. Thanks.
:/usr/chandra# awk -f test.awk input.txt
syntax error The source line is 1.
The error... (18 Replies)
Discussion started by: adept
18 Replies
6. Shell Programming and Scripting
Hi Im trying to tidy up the output of a who command when it writes to a log, everything I've tried doesnt seem to work though, any help would be massively appreciated. Im using the awk command to set the OFS as tab.
#!/bin/bash
who >> /export/home/tjmoore/logusers
awk -F 'BEGIN... (3 Replies)
Discussion started by: 02JayJay02
3 Replies
7. Shell Programming and Scripting
Hi, Could anyone tell me what Im doing wrong here any help will be much appreciated
#!/bin/bash
ls -ltr /export/home/tjmoore > /export/home/tjmoore/log100
awk -F " " /export/home/tjmoore/log100 'BEGIN {OFS="\t";} {print $1,$2,$3,$4,$5,
$6,$7,$8,$9;}' > /export/home/tjmoore/log1001
I... (9 Replies)
Discussion started by: 02JayJay02
9 Replies
8. Shell Programming and Scripting
Hello experts,
I have two files which I'm uploading. One is an awk script and other file acts as an input to the script via positional parameter.
awk -f intlmenu.awk jobsq.txt
This run fine in C shell on SCO OpenServer Release 5.0.7.
When I run it on Solaris 10 ( tcsh shell )
I get... (2 Replies)
Discussion started by: maverick_here
2 Replies
9. Shell Programming and Scripting
Dear all,
I am using following function of some script to assign variable "JobNo" some value form file $SAMPLE"_status.log" ( generated using the red color command )
crab ntuplize_crab -status -c $SAMPLE >& $SAMPLE"_status.log" &
echo $SAMPLE"_status.log" "====="
jobNo=$(awk... (10 Replies)
Discussion started by: emily
10 Replies
10. Shell Programming and Scripting
I am piping some output to awk and would like to print fields $1 $2 and $3 $4 only if they exist.
Note the awk begins with awk '{print $NF " " since I want the last field printed first. (7 Replies)
Discussion started by: motdman
7 Replies
UP2DATE(8) Red Hat, Inc. UP2DATE(8)
NAME
rhnsd - a program for quering the Red Hat Network for updates and information
SYNOPSIS
rhnsd [OPTION]...
DESCRIPTION
rhnsd is a daemon process that runs in the background and periodically polls the Red Hat Network to see if there are any queued actions
available. If any are queued, it runs them.
rhnsd is typically started from the init scripts in /etc/init.d/rhnsd when it's time to poll the Red Hat Network servers for available
updates and actions. The default interval is every 120 minutes. The minimum polling interval is 60 minutes.
To check for updates, rhnsd runs an external program called rhn_check. This is a small application that actually makes the network connec-
tion to Red Hat Networks.
The rhnsd daemon does not listen on any network ports, nor does it ever talk to the network directly. Any network activity is done via the
rhn_check utility.
rhnsd can be configure by editing the /etc/sysconfig/rhn/rhnsd config file. This is actually the configuration file the rhnsd init script
/etc/init.d/rhnsd uses.
-i, --interval
Specify the interval that rhnsd should wait between checking the Red Hat Network. Default is 120 minutes, the minimum is 60 minutes.
This can also be specified in /etc/sysconfig/rhn/rhnsd
-v, --verbose
output more information about what rhnsd is doing.
-f, --foreground
force the rhnds process to run in the foreground instead of automatically backgrounding itself, as it does by default.
FILES
/etc/sysconfig/rhn/rhnsd
Configuration settings for the rhnsd daemons init script.
/usr/sbin/rhn_check
The external program launched by rhnsd to connect to the Red Hat Network and retrieve any actions that have queued up.
/etc/sysconfig/rhn/systemid
A certification that authenticates the client machine to the Red Hat Network. Generated via the up2date or rhnreg_ks utility.
SEE ALSO
The rhnsd daemon is tightly coupled with Red Hat Network. Visit <http://www.redhat.com/network> for access or to sign up.
rhn_check(8), up2date(8), up2date-config(8),
AUTHORS
Written by Preston Brown <pbrown@redhat.com> and
Cristian Gafton <gafton@redhat.com>
REPORTING BUGS
Report bugs to <http://bugzilla.redhat.com>.
COPYRIGHT
Copyright (C) 1999, 2000 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
4th Berkeley Distribution Fri Feb 9 2001 UP2DATE(8)