[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] shell1line
From: |
Reinaldo Carvalho |
Subject: |
Re: [shell-script] shell1line |
Date: |
Sat, 15 Sep 2007 21:58:15 -0300 |
- Bash Expansions
data=root:x:0:0:root:/root:/bin/bash
echo ${data#*:} # show after first :
echo ${data##*:} # show after last :
echo ${data%:*} # show before last :
echo ${data%%:*} # show before fisrt :
echo ${data/:/,} # Switch first match
echo ${data//:/,} # Switch all matchs
--
Reinaldo Carvalho
On 9/15/07, Ivan lopes <address@hidden> wrote:
> Iniciado ....
>
>
> # Extract many files:
> $ ls *.tgz| sed 's/^/tar xvzf /'| sh
>
> # prompt
> Ctrl + a - Jump to the start of the line
> Ctrl + b - Move back a char
> Ctrl + c - Terminate the command
> Ctrl + d - Delete from under the cursor
> Ctrl + e - Jump to the end of the line
> Ctrl + f - Move forward a char
> Ctrl + k - Delete to EOL
> Ctrl + l - Clear the screen
> Ctrl + r - Search the history backwards
> Ctrl + R - Search the history backwards with multi occurrence
> Ctrl + u - Delete backward from cursor
> Ctrl + w - Delete backward a word
> Ctrl + xx - Move between EOL and current cursor position
> Ctrl + x @ - Show possible hostname completions
> Ctrl + z - Suspend/ Stop the command
>
> Alt + < - Move to the first line in the history
> Alt + > - Move to the last line in the history
> Alt + ? - Show current completion list
> Alt + * - Insert all possible completions
> Alt + / - Attempt to complete filename
> Alt + . - Yank last argument to previous command
> Alt + b - Move backward
> Alt + c - Capitalize the word
> Alt + d - Delete word
> Alt + f - Move forward
> Alt + l - Make word lowercase
> Alt + n - Search the history forwards non-incremental
> Alt + p - Search the history backwards non-incremental
> Alt + r - Recall command
> Alt + t - Move words around
> Alt + u - Make word uppercase
> Alt + back-space - Delete backward from cursor
>
>
> ---------------------------------------------------------------------
> Esta lista não admite a abordagem de outras liguagens de programação, como
> perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio
> aviso.
> ---------------------------------------------------------------------
> Sair da lista: address@hidden
> ---------------------------------------------------------------------
> Esta lista é moderada de acordo com o previsto em
> http://www.listas-discussao.cjb.net
> ---------------------------------------------------------------------
> Servidor Newsgroup da lista: news.gmane.org
> Grupo: gmane.org.user-groups.programming.shell.brazil
>
>
> Links do Yahoo! Grupos
>
>
>
Re: [shell-script] shell1line, Tiago Barcellos Peczenyj, 2007/09/18
Re: [shell-script] shell1line, anonymous misteryous, 2007/09/27