01-06-2007
Say the file format is like:
Record length: 1-30
Fields 1-10 > Emp ID
Fields 11-20 > Emp Name
Fields 21-30 > Contact No
I want 2 perform some awk operations.
Is there any option like -F is case of delimited file.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
How to sort a fixed length file on a given char range and just display the duplicates.
I did search for man sort to find any option but could find any.,something similar to cut -c 1-5,25-35.
I have alternate way of doing this by using combination of cut,awk. but this
creates extra temp... (6 Replies)
Discussion started by: sach_in
6 Replies
2. Shell Programming and Scripting
I am trying to display df -h command out in proper format, how can I display
each field of each record in a fixed length. (2 Replies)
Discussion started by: roopla
2 Replies
3. Shell Programming and Scripting
Hi,
Can we join two fixed length files in Unix using JOIN command? Is there any other command to accomplish the same?
Thanks,
G.Harikrishnan (6 Replies)
Discussion started by: gharikrishnan
6 Replies
4. Shell Programming and Scripting
OK I am somewhat new to UNIX programming please see what you can do to help.
I have a flat file that is a fixed length file containing different records based on the 1st character of each line. The 1st number at the beginning of the line is the record number, in this case it's record #1.
I... (3 Replies)
Discussion started by: ambroze
3 Replies
5. UNIX for Dummies Questions & Answers
I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies
6. Shell Programming and Scripting
I have a number of unix text files containing fixed-length records (normal unix linefeed terminator) where I need to find odd records which are an incorrect length.
The data is not validated and records can contain odd backslash characters and control characters which makes them awkward to process... (2 Replies)
Discussion started by: methyl
2 Replies
7. Shell Programming and Scripting
Need a script that manipulates a fixed length file that will compare 2 fields in that file and if they are equal write that line to a new file.
i.e. If fields 87-93 = fields 119-125, then write the entire line to a new file. Do this for every line in the file. After we get only the fields... (1 Reply)
Discussion started by: Muga801
1 Replies
8. Shell Programming and Scripting
I am very new to scripting and need to write a script that will extract the account number from a line that begins with HDR. For example, the file is as follows
HDR2010072600300405505100726 00300405505
LBJ FREEWAY DALLAS
TELEGRAPH ... (9 Replies)
Discussion started by: bds052189
9 Replies
9. Shell Programming and Scripting
Hi,
I am in a situation to print the message on a column, where the each line starting position should be same.
For example code:
HOSTNAME1="1.2.3.4.5.6.7"
TARGET_DIR="/tmp"
echo "HOSTNAME1:" "$HOSTNAME1" | awk -v var="Everyone" '{len=55-length;printf("%s%*s\n",$0,len,var)}'
echo... (4 Replies)
Discussion started by: tprabhaker
4 Replies
10. Shell Programming and Scripting
Hi,
I need to split a fixed length file of 160 characters based on value of a column. Example:
ABC 456780001 DGDG SDFSF
BCD 444440002 SSSS TTTTT
ABC 777750003 HHHH UUUUU
THH 888880001 FFFF LLLLLL
HHH 999990002 GGGG OOOOO
I need to split this file on basis of column from... (7 Replies)
Discussion started by: Neelkanth
7 Replies
BI2CF(6) BI2CF(6)
NAME
bi2cf - a map conversion tool for Crimson Fields
SYNOPSIS
bi2cf mapname [-p 1|2] [-f b|1|2|h] [-l] [-t mapname] [-i mapinfo] [-o outfile] [-d mapdir] [-O destdir] [-q]
bi2cf {-h | -v}
DESCRIPTION
bi2cf is a map conversion tool for Crimson Fields. It takes the data files of maps from Battle Isle, Battle Isle Data Disk 1 or 2, or
History Line 1914-1918 and converts them into map sources usable with the cfed(6) map compiler for Crimson Fields. bi2cf can handle both
uncompressed maps and levels crunched with TPWM.
For some units and tiles there are no corresponding counterparts in Crimson Fields. These cases are mapped to similar ones if available. As
a result some maps will not be as balanced as the originals, others may be unwinnable, and still others may even fail to compile. If this
happens the map in question needs to be adjusted manually.
OPTIONS
-d mapdir
Set the location of the Battle Isle map files.
-f b|1|2|h
Force map type to Battle Isle / BI Data Disk 1 / BI Data Disk 2 / History Line, respectively. Use this option when map format
autodetection does not work correctly. Maps from BI Data Disk 1 will always be detected as standard Battle Isle maps, so you have to use
-f 1 in that case.
-h
Print a usage message on standard output and exit.
-i mapinfo
Set map info message.
-l
Skip last row and column of the map. This is necessary for maps from the PC version of Battle Isle.
-o outfile
Write map to file outfile. Default file name is mapname.src.
-O destdir
Set target directory for the converted map. This setting is ignored if a map name was given using the -t option.
-p 1|2
Set default number of players for this map.
-q
Run quietly. Don't print processing information on standard output.
-t mapname
Set title and file name for the converted map. Default is maptype-mapname.
-v
Print version information on standard output and exit.
SEE ALSO
cfed(6), crimson(6)
COPYRIGHT
Copyright (C) 2002 Florian Dietrich
This software is distributed under the terms of the [1]GNU General Public License (GPL).
AUTHOR
Florian Dietrich <n8flo@yahoo.de>
Author.
REFERENCES
1. GNU General Public License
http://www.gnu.org/copyleft/gpl.html
Jan 30 2003 BI2CF(6)