This doesn't capture all fields from $3 to NF. Please re-check.
Here's one:
It looks better, sorry I maybe did not express correctly, I still need the columns to show on the same row, I just want awk to treat from $3 forward (for as many delimiters it may have on that line, $4, $5, $6, etc) as $3, so the output would be $1 $2 $3, e.g.
print $3 would print "this is a comment for this record"
Last edited by ppucci; 11-13-2012 at 07:56 PM..
Reason: i can't words
Hi,
I need some advise on treating non printable chars over ascii value 126
Case 1 :
On some fields in the text , I need to retiain then 'as-is' and load to a database.I understand it also depends on database codepage.
but i just wanna know how do i ensure it do not change while loading... (1 Reply)
Hi,
I'm looking for a script that receives the traps from a windows machine and treate them. For exemple just write a line in a file on UNIX server. Can you help me ?
Thank you. (2 Replies)
I have a file list.txt which has a list of file names with spaces between the file names like
/emptydir/file 1
how do i browse through the list.txt displaying the filenames. Almost all the file names in list.txt have space between them.This file list.txt is formed by using the find statement to... (5 Replies)
Is there a way to treat a string as date and compare it to the current date?
lets assum inpu lik
$ cat myfile
Name Last login
**************************
Sara 2/13/2012
kalpeer 2/15/2012
ygemici 2/14/2012
we want to display the name who logged in during the last #... (4 Replies)
Hi, I need to display the last column value in the below o/p.
sam2 PS 03/10/11 0 441
Unable to get o/p with this awk code
awk -F"+" '{ print $4 }' pwdchk.txt
I need to display 441(in this eg.) and also accept it as a variable to treat it with if condition and take a decision.... (1 Reply)
I'm trying to write a bash script to perform basic arithmetic operations but I want to run a comparison on the arguments first to check that they're a number greater than zero.
I want an error to pop up if the arguments args aren't >= 0 so I have:
if ! ]; then
echo "bad number: $1"
fi
... (14 Replies)
Hi, awk seem to be acting differently in Unix and Linux when it comes to formatting. This is making it difficult to migrate scripts.
for example:
UNIX:
echo "123" |awk '{printf ("%05s\n" ,$1)}'
00123
echo "123" |awk '{printf ("%05d\n" ,$1)}'
00123
echo "S12" |awk '{printf ("%05s\n"... (9 Replies)
Greetings Experts,
We are migrating from AIX to RHEL Linux. I have created a script to verify and report the NULLs and SPACEs in the key columns and duplicates on key combination of "|" delimited set of big files. Following is the code that was successfully running in AIX.
awk -F "|" 'BEGIN {... (5 Replies)
Hello there
I'd like to make a copy of 2nd column and have it printed in place of column 1. Remaining columns are needed as it.
test data:
ProbeSet GeneSymbol X22565285 X22566285
ILMN_1050008 MYOCD 6.577 7.395
ILMN_1050014 GPRC6A 6.595 6.668
ILMN_1050017 ... (2 Replies)
Discussion started by: genome
2 Replies
LEARN ABOUT SUSE
pcap_can_set_rfmon
PCAP_CAN_SET_RFMON(3PCAP)PCAP_CAN_SET_RFMON(3PCAP)NAME
pcap_can_set_rfmon - check whether monitor mode can be set for a not-yet-activated capture handle
SYNOPSIS
#include <pcap/pcap.h>
int pcap_can_set_rfmon(pcap_t *p);
DESCRIPTION
pcap_can_set_rfmon() checks whether monitor mode could be set on a capture handle when the handle is activated.
RETURN VALUE
pcap_can_set_rfmon() returns 0 if monitor mode could not be set, 1 if monitor mode could be set, PCAP_ERROR_NO_SUCH_DEVICE if the capture
source specified when the handle was created doesn't exist, PCAP_ERROR_PERM_DENIED if the process doesn't have permission to check whether
monitor mode could be supported, PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated, or PCAP_ERROR if an error
occurred. If PCAP_ERROR is returned, pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display the error
text.
SEE ALSO pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP), pcap_set_rfmon(3PCAP)
18 May 2010 PCAP_CAN_SET_RFMON(3PCAP)