avysk: (Default)
Alexey Vyskubov ([personal profile] avysk) wrote in [personal profile] ocehb 2010-10-08 07:08 pm (UTC)

Не, я не к тому. Если в первом файле вообще нет DESC, то в третий скопируется второй файл целиком. Неаккратненько.

Кроме того,
imac-alexey-vyskubov:~ alexey$ cat file.1
NO_DESCRIPTION
foobar
DESC
barfoo
imac-alexey-vyskubov:~ alexey$ cat file.2 
aaa
foobar
barfoo
imac-alexey-vyskubov:~ alexey$ grep -F "$(grep -m1 -A1 DESC file.1 | tail -1)" file.2 > file.3
imac-alexey-vyskubov:~ alexey$ cat file.3
foobar

Хотя в file.3 должно быть barfoo.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org