shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Contar registros posicionais


From: Julio C. Neves
Subject: Re: [shell-script] Contar registros posicionais
Date: Thu, 14 Jul 2016 00:39:32 -0300

Linha 1 delete, última linha($) delete

Abcs,
Julio
@juliobash

P
róximos cursos de Shell
Cidade         Local Período
São Paulo 4Linux 25
-29/07
Dou treinamento de Shell em qualquer cidade.
Para mais detalhes, me mande um e-mail.


2016-07-13 21:11 GMT-03:00 Leandro Valiengo address@hidden [shell-script] <address@hidden>:
 

ou julio,

muito obrigado.

Entendo que o "'1d;$d'" seja para desconsiderar a primeira e ultima linha.

abs,

--------------------------------------------
Em qua, 13/7/16, 'Julio C. Neves' address@hidden [shell-script] <address@hidden> escreveu:

Assunto: Re: [shell-script] Contar registros posicionais
Para: "address@hidden" <address@hidden>
Data: Quarta-feira, 13 de Julho de 2016, 20:25


 










Leandro,
$ echo
"00000*HEADER02653120062106800000001000000020160531935321902654440062106600000002000000020160531935322002654440062106600000002000000020160531935322102854440062106600000002000000020160531935322202654440062106600000002000000020160531935322302653120532106800000007000000020160531935322502653120532106100000002000000020160531935322703553120532106100000006000000020160531935322802653120532106100000010000000020160531935322902653120616055300037073000000020160531953619802653120856055300033207000000020160531953619902653120838055300025246000000020160531953620002653120616054200053889000000020160531953620102653120918055300022344000000020160531953620202653120608055300013590000000020160531953620302653120959055300019265000000020160531953620402653120836055300057839000000020160531953620500153120836055300134736000000020160531953620602653120659055300021651000000020160531953620799999*TRAILLER000000020"
| sed '1d;$d' | cut -c -3 | sort | uniq -c      1 001     16 026      1 028      1
035
Abcs,Julio@juliobash
Próximos cursos de
ShellCidade  
      Local Período
​São
Paulo 4Linux 25-29/07
Dou treinamento de Shell em qualquer cidade.
Para mais detalhes, me mande um e-mail.





Em 13 de julho de 2016
18:08, Leandro Valiengo address@hidden
[shell-script] <address@hidden>
escreveu:















 









Prezados,



boa noite.



Tenho duvidas em como contar a partir de um determinado
valor.



Tenho um arquivo:



00000*HEADER

026531200621068000000010000000201605319353219

026544400621066000000020000000201605319353220

026544400621066000000020000000201605319353221

028544400621066000000020000000201605319353222

026544400621066000000020000000201605319353223

026531205321068000000070000000201605319353225

026531205321061000000020000000201605319353227

035531205321061000000060000000201605319353228

026531205321061000000100000000201605319353229

026531206160553000370730000000201605319536198

026531208560553000332070000000201605319536199

026531208380553000252460000000201605319536200

026531206160542000538890000000201605319536201

026531209180553000223440000000201605319536202

026531206080553000135900000000201605319536203

026531209590553000192650000000201605319536204

026531208360553000578390000000201605319536205

001531208360553001347360000000201605319536206

026531206590553000216510000000201605319536207

99999*TRAILLER000000020



Preciso informar a quantidade de registros por tipo de
movimento (3 primeiras posições). E tenho q desconsiderar
nessa conta o header (00000) e trailer (99999)



Muito obrigado.



Leo

































#yiv4397933924 #yiv4397933924 --
#yiv4397933924ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}

#yiv4397933924 #yiv4397933924ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv4397933924 #yiv4397933924ygrp-mkp #yiv4397933924hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv4397933924 #yiv4397933924ygrp-mkp #yiv4397933924ads {
margin-bottom:10px;}

#yiv4397933924 #yiv4397933924ygrp-mkp .yiv4397933924ad {
padding:0 0;}

#yiv4397933924 #yiv4397933924ygrp-mkp .yiv4397933924ad p {
margin:0;}

#yiv4397933924 #yiv4397933924ygrp-mkp .yiv4397933924ad a {
color:#0000ff;text-decoration:none;}
#yiv4397933924 #yiv4397933924ygrp-sponsor
#yiv4397933924ygrp-lc {
font-family:Arial;}

#yiv4397933924 #yiv4397933924ygrp-sponsor
#yiv4397933924ygrp-lc #yiv4397933924hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv4397933924 #yiv4397933924ygrp-sponsor
#yiv4397933924ygrp-lc .yiv4397933924ad {
margin-bottom:10px;padding:0 0;}

#yiv4397933924 #yiv4397933924actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#yiv4397933924 #yiv4397933924activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#yiv4397933924 #yiv4397933924activity span {
font-weight:700;}

#yiv4397933924 #yiv4397933924activity span:first-child {
text-transform:uppercase;}

#yiv4397933924 #yiv4397933924activity span a {
color:#5085b6;text-decoration:none;}

#yiv4397933924 #yiv4397933924activity span span {
color:#ff7900;}

#yiv4397933924 #yiv4397933924activity span
.yiv4397933924underline {
text-decoration:underline;}

#yiv4397933924 .yiv4397933924attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}

#yiv4397933924 .yiv4397933924attach div a {
text-decoration:none;}

#yiv4397933924 .yiv4397933924attach img {
border:none;padding-right:5px;}

#yiv4397933924 .yiv4397933924attach label {
display:block;margin-bottom:5px;}

#yiv4397933924 .yiv4397933924attach label a {
text-decoration:none;}

#yiv4397933924 blockquote {
margin:0 0 0 4px;}

#yiv4397933924 .yiv4397933924bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv4397933924 .yiv4397933924bold a {
text-decoration:none;}

#yiv4397933924 dd.yiv4397933924last p a {
font-family:Verdana;font-weight:700;}

#yiv4397933924 dd.yiv4397933924last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#yiv4397933924 dd.yiv4397933924last p
span.yiv4397933924yshortcuts {
margin-right:0;}

#yiv4397933924 div.yiv4397933924attach-table div div a {
text-decoration:none;}

#yiv4397933924 div.yiv4397933924attach-table {
width:400px;}

#yiv4397933924 div.yiv4397933924file-title a, #yiv4397933924
div.yiv4397933924file-title a:active, #yiv4397933924
div.yiv4397933924file-title a:hover, #yiv4397933924
div.yiv4397933924file-title a:visited {
text-decoration:none;}

#yiv4397933924 div.yiv4397933924photo-title a,
#yiv4397933924 div.yiv4397933924photo-title a:active,
#yiv4397933924 div.yiv4397933924photo-title a:hover,
#yiv4397933924 div.yiv4397933924photo-title a:visited {
text-decoration:none;}

#yiv4397933924 div#yiv4397933924ygrp-mlmsg
#yiv4397933924ygrp-msg p a span.yiv4397933924yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv4397933924 .yiv4397933924green {
color:#628c2a;}

#yiv4397933924 .yiv4397933924MsoNormal {
margin:0 0 0 0;}

#yiv4397933924 o {
font-size:0;}

#yiv4397933924 #yiv4397933924photos div {
float:left;width:72px;}

#yiv4397933924 #yiv4397933924photos div div {
border:1px solid
#666666;min-height:62px;overflow:hidden;width:62px;}

#yiv4397933924 #yiv4397933924photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#yiv4397933924 #yiv4397933924reco-category {
font-size:77%;}

#yiv4397933924 #yiv4397933924reco-desc {
font-size:77%;}

#yiv4397933924 .yiv4397933924replbq {
margin:4px;}

#yiv4397933924 #yiv4397933924ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#yiv4397933924 #yiv4397933924ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}

#yiv4397933924 #yiv4397933924ygrp-mlmsg table {
font-size:inherit;font:100%;}

#yiv4397933924 #yiv4397933924ygrp-mlmsg select,
#yiv4397933924 input, #yiv4397933924 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#yiv4397933924 #yiv4397933924ygrp-mlmsg pre, #yiv4397933924
code {
font:115% monospace;}

#yiv4397933924 #yiv4397933924ygrp-mlmsg * {
line-height:1.22em;}

#yiv4397933924 #yiv4397933924ygrp-mlmsg #yiv4397933924logo {
padding-bottom:10px;}


#yiv4397933924 #yiv4397933924ygrp-msg p a {
font-family:Verdana;}

#yiv4397933924 #yiv4397933924ygrp-msg
p#yiv4397933924attach-count span {
color:#1E66AE;font-weight:700;}

#yiv4397933924 #yiv4397933924ygrp-reco
#yiv4397933924reco-head {
color:#ff7900;font-weight:700;}

#yiv4397933924 #yiv4397933924ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv4397933924 #yiv4397933924ygrp-sponsor #yiv4397933924ov
li a {
font-size:130%;text-decoration:none;}

#yiv4397933924 #yiv4397933924ygrp-sponsor #yiv4397933924ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv4397933924 #yiv4397933924ygrp-sponsor #yiv4397933924ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv4397933924 #yiv4397933924ygrp-text {
font-family:Georgia;}

#yiv4397933924 #yiv4397933924ygrp-text p {
margin:0 0 1em 0;}

#yiv4397933924 #yiv4397933924ygrp-text tt {
font-size:120%;}

#yiv4397933924 #yiv4397933924ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv4397933924



reply via email to

[Prev in Thread] Current Thread [Next in Thread]