Original file we are getting .......
Item Period Amt
P1 106 1000
P1 206 1500
P1 106 2000
P2 256 5800
P2 650 7500
My output should be like this
Item 106 206 256 650 ............
P1 1000 1500 0 ... (1 Reply)
Hi,
I need help on how to pivot the data in UNIX. I have one input file in which The facts(FACT1,FACT2..) and PERIOD(JAN,FEB..) are columns.I need to pivot the data. For Exampe The input file and output file looks like below. Could you please help with this using awk:).
INPUT:
====== ... (1 Reply)
Hello Unix guys,
I have the following 4 column data, which is a output of db2 select query:
Need to pivot the data.
sample Input:
Year Month Country Counts
2012 Aug Canada 114
2012 Aug USA 92
2012 Aug Mexico 3
2012 Aug ... (3 Replies)
Hi Friends,
I need to pivot data .
Below is my source data
Source Data
PK PRTY_KEY_ID PRTY_SUB_KEY_ID KEY_COL_VAL_TX MTCH_CNFDNCE_RATE
007824822 428844791 1 #Jemmy#Pom#600 Kearsarge Way 100
007824822 429283974 1 #Jemmy#Pom#120 Broadway 100
007824822 429739103 1 #Jemmy#Pom#600 Keae Way#757... (0 Replies)
Hi ,
Please any one help using shell scripts achieve the below output(pivoting on top_cd i mean type code values will come as individual columns and fixed amount is value for that .Any help would be greate
tx_id tx_amt typ_cd fixed_dis_amt
100 200 mc ... (3 Replies)
I/P:
I/P:
2017/01/01 a 10
2017/01/01 b 20
2017/01/01 c 40
2017/02/01 a 10
2017/02/01 b 20
2017/02/01 c 30
O/P:
a b c
2017/01/01 10 20 40
2017/02/01 10 20 30 (18 Replies)
Hi Team,
Could you please help me with the below scenario.
I have a file which is in the below format.
Zipcode,001,001f,002,002f,003,003f,004,004f,005,005f,006,006f,007,007f
0050, ,0, ,0, ,0, ,1,*,7, ,7, ,7
0060, ,0, ,0, ,7, ,0,*,7, ,0, ,0
Would need the output as below.
First field... (1 Reply)
Discussion started by: saj
1 Replies
LEARN ABOUT X11R4
printf
PRINTF(1) User Commands PRINTF(1)NAME
printf - format and print data
SYNOPSIS
printf FORMAT [ARGUMENT]...
printf OPTION
DESCRIPTION
Print ARGUMENT(s) according to FORMAT, or execute according to OPTION:
--help display this help and exit
--version
output version information and exit
FORMAT controls the output as in C printf. Interpreted sequences are:
" double quote
\ backslash
a alert (BEL)
backspace
c produce no further output
e escape
f form feed
new line
carriage return
horizontal tab
v vertical tab
NNN byte with octal value NNN (1 to 3 digits)
xHH byte with hexadecimal value HH (1 to 2 digits)
uHHHH Unicode (ISO/IEC 10646) character with hex value HHHH (4 digits)
UHHHHHHHH
Unicode character with hex value HHHHHHHH (8 digits)
%% a single %
%b ARGUMENT as a string with '' escapes interpreted, except that octal escapes are of the form or NNN
%q ARGUMENT is printed in a format that can be reused as shell input, escaping non-printable characters with the proposed POSIX $''
syntax.
and all C format specifications ending with one of diouxXfeEgGcs, with ARGUMENTs converted to proper type first. Variable widths are han-
dled.
NOTE: your shell may have its own version of printf, which usually supersedes the version described here. Please refer to your shell's
documentation for details about the options it supports.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report printf translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO printf(3)
Full documentation at: <http://www.gnu.org/software/coreutils/printf>
or available locally via: info '(coreutils) printf invocation'
GNU coreutils 8.28 January 2018 PRINTF(1)