I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
I have a file with 32 fields each separated by ‘|”. I need to add a file date exactly in the format “ "20100120" “ as the 32nd field moving the existing 32nd field to 33. so the field I added should be 32nd and the 33rd field is the last field before I added the file date.
I know we can... (8 Replies)
Hi, I have a series of files (upwards of 500) the filename format is as follows
CC10-1234P1999.WGS84.p190, all in one directory.
Now the last three numeric characters, in this case 999, can be anything from 001 to 999.
I need to move some of them to a seperate directory, the ones I need to... (5 Replies)
Hi All,
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
a,b,c,d,8,,,
a,b,c,d,,7,,
a,b,c,d,,,9,
a,b,p,e,8,,,
a.b,p,e,,9,,
a,b,p,z,,,,9
a,b,p,z,,8,,
desired output:
... (1 Reply)
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Hello
I have a file with this content
=============================================================
1, Het Juvenalis dilemma, Digital fortress, 1998
2, Het Bernini mysterie, Angels & demons, 2000
3, De Delta deceptie, Deception point, 2001
4, De Da Vinci code, The Da... (3 Replies)
Hi All,
I receive a | delimited text file containing 63 columns. There is no delimiter at the end of the 63rd field, instead there would be a newline character at the end of the text in 63rd column. I wanted to retain this newline character at the end of the 63rd column, as it is desired newline... (1 Reply)
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Could you please advise what is the best way to edit a file without disrupting the spaces?
For example: I have within my file the value below, wherein I wanted to change VALUE2 to VALUETEST.
The total characters on the field of VALUE2 is 15 characters.
VALUE1|VALUE2<9 spaces>|VALUE3
but... (3 Replies)
Discussion started by: asdfghjkl
3 Replies
LEARN ABOUT NETBSD
cut
CUT(1) BSD General Commands Manual CUT(1)NAME
cut -- select portions of each line of a file
SYNOPSIS
cut -b list [-n] [file ...]
cut -c list [file ...]
cut -f list [-d delim] [-s] [file ...]
DESCRIPTION
The cut utility selects portions of each line (as specified by list) from each file and writes them to the standard output. If the file
argument is a single dash ('-') or no file arguments were specified, lines are read from the standard input. The items specified by list can
be in terms of column position or in terms of fields delimited by a special character. Column numbering starts from 1.
list is a comma or whitespace separated set of increasing numbers and/or number ranges. Number ranges consist of a number, a dash (-), and a
second number and select the fields or columns from the first number to the second, inclusive. Numbers or number ranges may be preceded by a
dash, which selects all fields or columns from 1 to the first number. Numbers or number ranges may be followed by a dash, which selects all
fields or columns from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. It
is not an error to select fields or columns not present in the input line.
The options are as follows:
-b list The list specifies byte positions.
-c list The list specifies character positions.
-d string Use the first character of string as the field delimiter character. The default is the <TAB> character.
-f list The list specifies fields, separated by the field delimiter character. The selected fields are output, separated by the field
delimiter character.
-n Do not split multi-byte characters.
-s Suppresses lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified.
EXIT STATUS
cut exits 0 on success, 1 if an error occurred.
SEE ALSO paste(1)STANDARDS
The cut utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'').
BSD December 21, 2008 BSD