|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Sergey Babitch 2:5020/400 22 Aug 2007 15:17:34 To : Victor Sudakov Subject : Re: напечатать строку вместо кодов символов -------------------------------------------------------------------------------- Hi, Victor! On Wed, Aug 22, 2007 at 06:16:54AM +0000, Victor Sudakov wrote: [Skipped by Sergey Babitch] > Hе понял, при чём тут разные шеллы. Я тебе предлагаю попробовать > /usr/bin/printf "\xD0\xA0\xD1\x83\xD1\x87\xD0\xBA\xD0\xB8\xD0\xBD" > > Либо в bash есть встроенный printf? Да. > /usr/bin/printf "\xD0\xA0\xD1\x83\xD1\x87\xD0\xBA\xD0\xB8\xD0\xBD" xD0xA0xD1x83xD1x87xD0xBAxD0xB8xD0xBD> > printf "\xD0\xA0\xD1\x83\xD1\x87\xD0\xBA\xD0\xB8\xD0\xBD" пНяїяґпРпЛпЧ> > man bash [Skipped by Sergey Babitch] printf [-v var] format [arguments] Write the formatted arguments to the standard output under the control of the format. The format is a character string which contains three types of objects: plain characters, which are simply copied to standard output, character escape sequences, which are converted and copied to the standard output, and for- mat specifications, each of which causes printing of the next successive argument. In addition to the standard printf(1) for- mats, %b causes printf to expand backslash escape sequences in the corresponding argument (except that \c terminates output, backslashes in \', \", and \? are not removed, and octal escapes beginning with \0 may contain up to four digits), and %q causes printf to output the corresponding argument in a format that can be reused as shell input. The -v option causes the output to be assigned to the variable var rather than being printed to the standard output. The format is reused as necessary to consume all of the argu- ments. If the format requires more arguments than are supplied, the extra format specifications behave as if a zero value or null string, as appropriate, had been supplied. The return value is zero on success, non-zero on failure. -- Good Luck! Sergey Babitch (SB551-RIPE) ICQ: 105517491 FreeLance Artist --- ifmail v.2.15dev5.4 * Origin: Demos online service (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор Архивное /ru.unix.bsd/1961548c57dc2.html, оценка из 5, голосов 10
|