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

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

Re: [shell-script] deixar tdo numa linha só


From: Gentil de Bortoli Júnior
Subject: Re: [shell-script] deixar tdo numa linha só
Date: Mon, 04 Apr 2005 13:03:42 -0300
User-agent: Debian Thunderbird 1.0 (X11/20050116)

Daniel, veja alguns exemplos:

$ cat teste.txt
1
2
3
4
5
6

$ cat teste.txt | tr -d "\n"
123456

$ cat teste.txt | paste -s 1 2 3 4 5 6

$ cat teste.txt | paste -s -d " "
1 2 3 4 5 6

$ cat teste.txt | paste -s -d ""
123456

Também é possível fazer isso com sed.

[]'s

Gentil.

Daniel wrote:

$cat arquivo.txt
1
2
3
4
5

$cat arquivo.txt
12345



reply via email to

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