Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Walmes Marques Zeviani
linux-config
Commits
f0e33ea8
Commit
f0e33ea8
authored
9 years ago
by
Walmes Zeviani (@octa)
Browse files
Options
Downloads
Patches
Plain Diff
arquivo com dicas.
parent
a6936725
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dicas_linux.Rmd
+95
-0
95 additions, 0 deletions
dicas_linux.Rmd
with
95 additions
and
0 deletions
dicas_linux.Rmd
0 → 100644
+
95
−
0
View file @
f0e33ea8
---
output:
knitrBootstrap::bootstrap_document:
theme: Flatly
highlight: Solarized - Light
theme.chooser: TRUE
highlight.chooser: TRUE
---
```{r setup, include=FALSE, purl=FALSE}
##----------------------------------------------------------------------
## Knitr settings. Do not run.
library(knitr)
library(knitrBootstrap)
library(rmarkdown)
opts_chunk$set(
bootstrap.show.message=FALSE,
bootstrap.show.error=FALSE,
bootstrap.show.warning=FALSE)
options(width=70)
```
<center>
****
<h1>
Dicas de Linux
</h1>
[Walmes Zeviani](http://leg.ufpr.br/~walmes/ "email: walmes@ufpr.br")
<img src="http://orig13.deviantart.net/3976/f/2013/206/1/9/simple_linux_logo_by_dablim-d5k4ghu.png">
</center>
****
## Procura e sustituição de texto
```{r, eval=FALSE, engine="bash"}
##----------------------------------------------------------------------
grep -r --include=*.R 'texto_buscado' *
##----------------------------------------------------------------------
sed -i 's/texto_antigo/texto_novo/g' arquivo.txt
sed 's/texto_antigo/texto_novo/g' arquivo.txt
sed 's/texto_antigo/texto_novo/g' input.txt > output.txt
sed -i 's/texto_antigo/texto_novo/g' *.txt
##----------------------------------------------------------------------
## Trocar texto dentro de um arquivo. O texto 'walmes' será substituido
## por 'zeviani' dentro do arquivo experII.R
perl -i -pe 's/walmes/zeviani/;' experII.R
##----------------------------------------------------------------------
## Lista onde existe 90 tracos seguidos.
egrep '\-{90}' aula7.R
##----------------------------------------------------------------------
## Se uma linha excede 77 traços deixe apenas 77.
sed 's/\(\-\{77\}\).*/\1/g' arquivo.txt
##----------------------------------------------------------------------
## Fazer isso em todos os aquivos de extensão R.
sed -i 's/\(\-\{77\}\).*/\1/g' *.R
##----------------------------------------------------------------------
## Substituí o texto `green!30!black` por `darkgreen` dentro do
## diretório para arquivos com extensão `*.pgf`.
grep -rl 'green!30!black' *.pgf | \
xargs sed -i 's/green!30!black/darkgreen/g'
##----------------------------------------------------------------------
## Remove os "_" (underlines) do nome dos arquivos e subtitui por
## espaços " ".
find -type f -exec rename 'y/\_/\ /' {} \;
##----------------------------------------------------------------------
## Remove o espaço antes de .pdf nos arquivos.
find -type f -exec rename 's/\ \./\./' {} \;
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment