#!/bin/ksh
IFS=':'
mPrev=""
while read mTitle mDesc
do
if [[ "${mTitle}" != "${mPrev}" ]]; then
echo ${mTitle}':'
mPrev=${mTitle}
fi
echo ${mDesc}
done < inp_file
I am trying to write an awk program to reformat a data table and convert the date to julian time. I have all the individual steps working, but I am having some issues joing them into one program. Can anyone help me out? Here is my code so far:
# This is an awk program to convert the dates from... (4 Replies)
I am helping my wife set up a real estate site and I am starting to integrate MLS listings. We are using a HostGator level 5 VPS running CentOS and have full root and SSH access to the VPS.
Thus far I have automated the daily FTP download of listings from our MLS server using a little sh script.... (4 Replies)
I have this input and want output like below, how can I achieve that through awk:
Input:
CAT1 FRY-01
CAT1 FRY-04
CAT1 DRY-03
CAT1 FRY-02
CAT1 DRY-04
CAT2 FRY-03
CAT2 FRY-02
CAT2 DRY-01
FAT3 DRY-12
FAT3 FRY-06
Output:
category CAT1
item FRY-01 (7 Replies)
Hi there. I need to reformat a large file. Here is a sample of the file.
NETIK0102_UCS_Boot_a,NETIK0102_UCS_Boot_b
5200 2438 70G
5200 2439 70G
NETIK0102_UCS_HBA0_a,NETIK0102_UCS_HBA1_b,NETIK0102_UCS_HBA2_a,NETIK0102_UCS_HBA3_b
2673 19D7 55G
2673 19C0 30G
2673 19F5 120G... (5 Replies)
I need to rearrange the output but i am unable to arrange it to match the format. In the output i need NAME=\"To in the column .
Bash:
#!/bin/bash
cd /cygdrive/c/output/a
cat *.txt > output.txt
i=/cygdrive/c/output/a/output.csv
#echo "NE_Name, Source, Destination, OSPF_AREA_ID"... (4 Replies)
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT DEBIAN
dwfilter
dwfilter(1) reformat text for processing dwfilter(1)NAME
dwfilter - reformat text with dwdiff for further processing
SYNOPSIS
dwfilter [OPTIONS] <OLD FILE> <NEW FILE> <POST PROCESSOR> [POST PROCESSOR OPTIONS]
DESCRIPTION
dwfilter reformats the text in the old file according to the contents of the new file (or vice versa) and subsequently passes the refor-
mated old file and the new file through a secondary filter. It's main use is to allow visual diff programs such as meld and kdiff3 to be
used, eventhough a text file has been reformated after editing. A further use is to allow the creation of small patches even when the new
text has been reformated. dwfilter uses dwdiff for reformatting.
OPTIONS -r, --reverse
Reformat the new file based on the contents of the old file instead of the default where the old file is reformated based on the
contents of the new file.
dwfilter accepts the following dwdiff options:
-d <delimiters>, --delimiters=<delimiters>
-P, --punctuation>
-W <whitespace>, --whitespace=<whitespace>
-i, --ignore-case
-I, --ignore-formatting
-D <option>, --diff-option=<option>
-C<num>, --context=<num>
-m<num>, --match-context=<num>
--aggregate-changes
--wdiff-output
See the dwdiff manual page for the meaning.
A single dash (-) as a file can be used to denote standard input. Only one file can be read from standard input. To stop dwfilter from
interpreting file names that start with a dash as options, one can specify a double dash (--) after which dwfilter will interpret any fol-
lowing arguments as files to read.
BUGS
If you think you have found a bug, please check that you are using the latest version of dwdiff [http://os.ghalkes.nl/dwdiff.html]. When
reporting bugs, please include a minimal example that demonstrates the problem.
AUTHOR
G.P. Halkes <dwdiff@ghalkes.nl>
COPYRIGHT
Copyright (C) 2006-2010 G.P. Halkes
dwdiff is licensed under the GNU General Public License version 3.
For more details on the license, see the file COPYING in the documentation directory. On Un*x systems this is usually
/usr/share/doc/dwdiff-2.0.4.
SEE ALSO dwdiff(1), diff(1), meld(1), kdiff3(1)Version 2.0.4 12-06-2012 dwfilter(1)