I have a large csv file that looks like this:
The 3rd field is a unix time stamp that I want to convert to human readable.
I wrote a bash script with this code:
IFS=$','
cat $1 | while read ID user DATE text flags read; do
echo -e "$ID,$user,$(date -d @$DATE),$text,$flags,$read... (3 Replies)
Hi All,
I wanted to find 200th field value in delimiter file using awk.?
awk '{print $200}' inputfile
I am getting error message :-
awk: The field 200 must be in the range 0 to 199.
The source line number is 1.
The error context is
{print >>> $200 <<< }
using... (4 Replies)
Hi,
Is there any short method to print from a particular field till another filed using awk?
Example File:
File1
====
1|2|acv|vbc|......|100|342
2|3|afg|nhj|.......|100|346
Expected output:
File2
====
acv|vbc|.....|100
afg|nhj|.....|100 (8 Replies)
How do I do the product of nth filed just like sum. For sum I know like
awk '{ sum += $12 } END {printf "%.2f\n", sum}'
works as initial sum = 0.
But for product how do initialize the variable to 1? (2 Replies)
Using Awk, how can I achieve the following?
I have set of record numbers, for which, I have to replace the nth field with some values, say spaces.
Eg:
Set of Records : 4,9,10,55,89,etc
I have to change the 8th field of all the above set of records to spaces (10 spaces).
Its a delimited... (1 Reply)
In the tab-delimeted input file below I am trying to use awk to update the value in $2 if TYPE=ins in bold, by adding the value of
HRUN= in italics. In the below since in line 1 TYPE=ins the 117282541 value in $2 has 6 added because that is the value of HRUN=.
Hopefully the awk is a start but I... (2 Replies)
I am trying to output a tab-delimited result that uses the data from a tab-delimited file to combine and subtract specific lines.
If $4 matches in each line then the first matching sequential $6 value is added to $2, unless the value is 1, then the original $2 is used (like in the case of line... (3 Replies)
For some reason I am having difficulty performing what should be a fairly easy task. I would like to print lines of a file that have a unique value in the first field. For example, I have a large data-set with the following excerpt:
PS003,001 MZMWR/ L-DWD// *
PS003,001... (4 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Hi,
So awk is driving me crazy on this one. I have searched everywhere and read man, docs and every related post Google can find and still no luck. The actual files I need to run this on are sensitive in nature, but it is the same thing as if I needed to calculate weighted grades for multiple... (15 Replies)
Discussion started by: cotilloe
15 Replies
LEARN ABOUT DEBIAN
nwpjmv
NWPJMV(1) nwpjmv NWPJMV(1)NAME
nwpjvm - Move print job to Unix queue
SYNOPSIS
nwpjmv [ -S server ] [ -h ] [ -U user name ] [ -P password | -n ] [ -C ] [ -q queue name ] [ -c command ] [ -j job number ] [ -d ]
DESCRIPTION
nwpjmv is a program that connects to print queues on NetWare servers and moves a designated print job to a Unix queue.
OPTIONS -h
-h is used to print out a short help text.
-S server
server is the name of the server you want to use.
-U user
user is the print server name at the server.
-P password
password is the password to use for the print server at the server. If neither -n nor -P are given, and the user has no open connection
to the server, pserver prompts for a password.
-n
-n should be given if the print server does not require a password.
-C
By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off
this conversion by -C.
-q queue name
queue name is the name of the print queue you want to service.
-c command
nwpjmv removes the designated job from the Novell queue and feeds the job file to stdin. command is the printing command that is exe-
cuted for each job. The default command is 'lpr'.
You can insert several flags into the command, preceded by %. These are replaced with values retrieved from the queue structure for the
print job.
%u: This field will be replaced by the name of the user who posted this print job.
%d: This field will be replaced by the job description field of this print job.
-j job number
This designates the ID number of the print job to be moved.
-d causes extra error messages to be logged.
SEE ALSO nwclient(5), slist(1), pqlist(1), ncpmount(8), ncpumount(8), pserver(1)CREDITS
nwpjmv was written by Bruno Browning (bruno@lss.wisc.edu) based on pserver by Volker Lendecke (lendecke@math.uni-goettingen.de)
nwpjmv 03/15/2003 NWPJMV(1)