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

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

Re: [shell-script] Procura em nome de arquivo


From: Julio C. Neves
Subject: Re: [shell-script] Procura em nome de arquivo
Date: Fri, 29 Jul 2016 22:53:00 -0300

Isso além de ser o mais rápido, deve funcionar:

echo *[RS]0[129]

Abcs,
Julio
@juliobash

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


2016-07-29 15:16 GMT-03:00 Leandro Valiengo address@hidden [shell-script] <address@hidden>:
 

Oi pessoal,

boa tarde.

Deixa eu explicar melhor....

Terei arquivos:

BLA.REC.APL.TTTT.R01
BLA.TTT.S02
BLA.RRS.TET.RRR.R03

A unica coisa constante sao os 3 ultimos caracteres. Serão sempre R ou S e dois digitos numericos 01, 02, 09.....Por isso peço para procurar de tras para frente....pois a unica certeza que tenho é que os tres ultimos caracteres será sempre .R01 ou .R34 ou .S09...

abs,

--------------------------------------------
Em sex, 29/7/16, address@hidden [shell-script] <address@hidden> escreveu:

Assunto: Re: [shell-script] Procura em nome de arquivo
Para: address@hidden
Data: Sexta-feira, 29 de Julho de 2016, 12:06


 









Olá Ultimo, pelo que entendi a pesquisa é pelos
nomes dos arquivos.



Pode ser com find

find /caminho -name '*.[RS]*'

é bem genérico mas vc pode especificar mais, por exemplo
se a extensão for

sempre R ou S seguido de dois números
'*.[RS][0-9][0-9]'

Abraços Paulo



On 29-07-2016 09:48, 'Ultimo de Miranda'
address@hidden [shell-script] wrote:

>

>

> Não entendi muito bem a questão mas quem sabe isso te
dá alguma ideia ...

>

> [miranda@guitar Mixtureba]$ cat x

> BLABLABLA.R01

> BLABLABLA.S03

> [miranda@guitar Mixtureba]$ awk -F"."
'{A=substr($2,1,1);print A}' x

> R

> S

>

>

>

>

> Em 29/07/2016 08:31:59, leandro_valiengo
address@hidden [shell-script] escreveu:

>

>

>

> Pessoal,

>

> Bom dia.

>

> Tenho 2 tipos de arquivos com os seguintes
nomes:

>

> BLABLABLA.R01

> BLABLABLA.S03

>

> Como eu localizo pela letra R ou S da terceira
posicao de tras para frente?

>

> Abs

>

>

>

> Enviado do meu smartphone Samsung Galaxy.

>

>

>











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

#yiv4772063443 #yiv4772063443ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv4772063443 #yiv4772063443ygrp-mkp #yiv4772063443hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv4772063443 #yiv4772063443ygrp-mkp #yiv4772063443ads {
margin-bottom:10px;}

#yiv4772063443 #yiv4772063443ygrp-mkp .yiv4772063443ad {
padding:0 0;}

#yiv4772063443 #yiv4772063443ygrp-mkp .yiv4772063443ad p {
margin:0;}

#yiv4772063443 #yiv4772063443ygrp-mkp .yiv4772063443ad a {
color:#0000ff;text-decoration:none;}
#yiv4772063443 #yiv4772063443ygrp-sponsor
#yiv4772063443ygrp-lc {
font-family:Arial;}

#yiv4772063443 #yiv4772063443ygrp-sponsor
#yiv4772063443ygrp-lc #yiv4772063443hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv4772063443 #yiv4772063443ygrp-sponsor
#yiv4772063443ygrp-lc .yiv4772063443ad {
margin-bottom:10px;padding:0 0;}

#yiv4772063443 #yiv4772063443actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

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

#yiv4772063443 #yiv4772063443activity span {
font-weight:700;}

#yiv4772063443 #yiv4772063443activity span:first-child {
text-transform:uppercase;}

#yiv4772063443 #yiv4772063443activity span a {
color:#5085b6;text-decoration:none;}

#yiv4772063443 #yiv4772063443activity span span {
color:#ff7900;}

#yiv4772063443 #yiv4772063443activity span
.yiv4772063443underline {
text-decoration:underline;}

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

#yiv4772063443 .yiv4772063443attach div a {
text-decoration:none;}

#yiv4772063443 .yiv4772063443attach img {
border:none;padding-right:5px;}

#yiv4772063443 .yiv4772063443attach label {
display:block;margin-bottom:5px;}

#yiv4772063443 .yiv4772063443attach label a {
text-decoration:none;}

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

#yiv4772063443 .yiv4772063443bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv4772063443 .yiv4772063443bold a {
text-decoration:none;}

#yiv4772063443 dd.yiv4772063443last p a {
font-family:Verdana;font-weight:700;}

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

#yiv4772063443 dd.yiv4772063443last p
span.yiv4772063443yshortcuts {
margin-right:0;}

#yiv4772063443 div.yiv4772063443attach-table div div a {
text-decoration:none;}

#yiv4772063443 div.yiv4772063443attach-table {
width:400px;}

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

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

#yiv4772063443 div#yiv4772063443ygrp-mlmsg
#yiv4772063443ygrp-msg p a span.yiv4772063443yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv4772063443 .yiv4772063443green {
color:#628c2a;}

#yiv4772063443 .yiv4772063443MsoNormal {
margin:0 0 0 0;}

#yiv4772063443 o {
font-size:0;}

#yiv4772063443 #yiv4772063443photos div {
float:left;width:72px;}

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

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

#yiv4772063443 #yiv4772063443reco-category {
font-size:77%;}

#yiv4772063443 #yiv4772063443reco-desc {
font-size:77%;}

#yiv4772063443 .yiv4772063443replbq {
margin:4px;}

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

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

#yiv4772063443 #yiv4772063443ygrp-mlmsg table {
font-size:inherit;font:100%;}

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

#yiv4772063443 #yiv4772063443ygrp-mlmsg pre, #yiv4772063443
code {
font:115% monospace;}

#yiv4772063443 #yiv4772063443ygrp-mlmsg * {
line-height:1.22em;}

#yiv4772063443 #yiv4772063443ygrp-mlmsg #yiv4772063443logo {
padding-bottom:10px;}


#yiv4772063443 #yiv4772063443ygrp-msg p a {
font-family:Verdana;}

#yiv4772063443 #yiv4772063443ygrp-msg
p#yiv4772063443attach-count span {
color:#1E66AE;font-weight:700;}

#yiv4772063443 #yiv4772063443ygrp-reco
#yiv4772063443reco-head {
color:#ff7900;font-weight:700;}

#yiv4772063443 #yiv4772063443ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv4772063443 #yiv4772063443ygrp-sponsor #yiv4772063443ov
li a {
font-size:130%;text-decoration:none;}

#yiv4772063443 #yiv4772063443ygrp-sponsor #yiv4772063443ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv4772063443 #yiv4772063443ygrp-sponsor #yiv4772063443ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv4772063443 #yiv4772063443ygrp-text {
font-family:Georgia;}

#yiv4772063443 #yiv4772063443ygrp-text p {
margin:0 0 1em 0;}

#yiv4772063443 #yiv4772063443ygrp-text tt {
font-size:120%;}

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



reply via email to

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