Sponsored Content
Top Forums Shell Programming and Scripting Removing parts of a specific field Post 302138004 by radoulov on Friday 28th of September 2007 07:14:50 AM
Old 09-28-2007
Code:
nawk '$4=int($4)' FS=", " OFS=", " filename

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

removing parts of a line with SED

hi, i'm trying to erase all the characters after, and including, the first test test Output: test1 test2 test3 this is what I tried, but didn't work sed "s/*//" file > testfilename any suggestions? thanks, gammmaman (2 Replies)
Discussion started by: gammaman
2 Replies

2. Shell Programming and Scripting

How can i break a text file into parts that occur between a specific pattern

How can i break a text file into parts that occur between a specific pattern? I have text file having various xml many tags like which starts with the tag "<?xml version="1.0" encoding="utf-8"?>" . I have to break the whole file into several xmls by looking for the above pattern. All the... (9 Replies)
Discussion started by: abhinav192
9 Replies

3. Shell Programming and Scripting

Truncate Specific Parts of a String

How do you truncate specific parts of a string. Example: 1 This is the string Goal: This is the string As you can see I'm trying to simply remove the first two characters of the string the number one and the space between the one and the word "this." Your help is appreciated. ... (8 Replies)
Discussion started by: royarellano
8 Replies

4. UNIX for Dummies Questions & Answers

Help with copying specific parts of a file structure

Hello. I need help with copying part of a file structure to another directory while still keeping the structure. For example look below: ../folder1/sub1/txt.txt ../folder1/sub2/pic.png ../folder2/sub1/pic.png ../folder2/sub2/txt.txt So in this I would like to copy only the directories and... (3 Replies)
Discussion started by: the
3 Replies

5. Shell Programming and Scripting

perl, splitting out specific parts of the string

Hi there, I have an output from a command like this # ypcat -k netgroup.byuser| grep steven steven.* users_main,users_sysadmin,users_global,users_backup_team and wanted to pull the 'users' netgroups returned into a perl array, that will look like this users_main... (2 Replies)
Discussion started by: rethink
2 Replies

6. Shell Programming and Scripting

Replace specific field on specific line sed or awk

I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work. Brief overview: I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies

7. Shell Programming and Scripting

Delete specific parts in a .txt file

Hi all, I desperately need a small script which deletes everything in a particular .txt file when "Abs = {" appears till "},", and also when "B-1 = {" appears till "}," I would like all the text in between of those instances to be deleted, however, other text to be unedited (kept as it is).... (12 Replies)
Discussion started by: c_lady
12 Replies

8. Shell Programming and Scripting

How to print with awk specific field different from specific character?

Hello, i need help with awk. I have this file: cat number DirB port 67 er_enc_out 0 er_bad_os 0 DirB port 71 er_enc_out 56 er_bad_os 0 DirB port 74 er_enc_out 0 er_bad_os 0 DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies

9. Shell Programming and Scripting

Incrementing parts of ten digits number by parts

I have number in file which contains date and serial number: 2013101000. The last two digits are serial number (00). So maximum of serial number is 100. After reaching 100 it becomes 00 with incrementing 10 which is day with max 31. after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies

10. UNIX for Dummies Questions & Answers

Split a file into parts only if the first field is different

Hi, I have a file like this: aaa 123 aaa 223 aaa 225 bbb 332 bbb 423 bbb 6755 bbb 324 ccc 112 ccc 234 ccc 897 Which I need to split into several files, something like split -l 3 but the way that the lines with the same names would only go into one file: (7 Replies)
Discussion started by: coppuca
7 Replies
ASNTOOL(1)						     NCBI Tools User's Manual							ASNTOOL(1)

NAME
asntool - process ASN.1 module specifications SYNOPSIS
asntool [-] [-B filename] [-D N] [-G] [-I str] [-J type] [-K str] [-L str] [-M filename,...] [-P str] [-Q] [-S filename] [-T filename] [-V] [-X filename] [-Z] [-b N] [-d filename] [-e filename] [-f filename] [-l filename] -m filename [-o filename] [-p filename] [-t str] [-v filename] [-w N] [-x filename] DESCRIPTION
asntool reads, validates, and displays ASN.1 module specifications. OPTIONS
A summary of options is included below. - Print usage message -B filename Generate objects and code in files named filename.* -D N Debugging level for code generation: 0 No debugging (default) 1 Shallow debugging 2 Deep debugging 3-9 Same as 2 -G Generate object loader .c and .h files -I str Put "#include str" in generated .c file -J type Register type type with object manager -K str In generated .c, force name of #included asn header to str -L str Label registered type as str -M filename,... Search the ASN.1 modules in filename,... for external references -P str XML module prefix for DOCTYPE -Q Use quoted syntax form for generated include files -S filename Send debugging output to filename rather than stderr -T filename Dump ASN.1 tree to filename -V Force CHOICE objects to use custom structures rather than ValNodePtrs, for compatibility with some old hand-coded object loaders. -X filename Write XML DTD to filename. If filename is "m", print each module to a separate file. -Z Bit twiddle for optional zero value base slots -b N Use N-byte buffers (default = 1024; anything between 512 and 10000 is legal) -d filename Read binary values from filename (requires -t) -e filename Write binary values to filename -f filename Write ASN.1 module to filename -l filename Write ASN.1 loader to filename -m filename Read ASN.1 module from filename -o filename Write header to filename -p filename Write print values to filename -t str Expect binary values to have type str -v filename Read print values from filename -w N Limit values in #defines to N bits (default = 31; anything between 31 and 128 is legal) -x filename Write XML data to filename AUTHOR
The National Center for Biotechnology Information. NCBI
2010-09-01 ASNTOOL(1)
All times are GMT -4. The time now is 03:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy