Команды SFK


    1        2        3        4        5        6        7        8        9        10    

Раздел 3. Conversion - Преобразование
bin-to-src | chars | crlf-to-lf | csvtotab | dec | decode | detab | encode | entab | hex | hexdump | hextobin | join | lf-to-crlf | oload | scantab | split | tabtocsv | utoa | uuencode | wtoa | wtou |

Help:   Рус   |   Eng        Refer:   Рус   |   Eng  

Команда: decode
sfk encode|decode [infile] format [options]

   en- or decode text or data.

   formats
      -base64    encode all chars as a-z A-Z 0-9 +/
                 with = used as padding character.
                 add -nowrap to keep the output
                 as one long line.
      -hex       encode all chars as hexadecimal
      -_hex      encode non-alphanumeric characters
                 as prefix _ and hex value
      -\x25hex   encode non-alnum chars as % and hex
      -url       same as -\x25hex

   options
      -all       encode all chars, not just non-alnum
      -noeol     if text lines are received from a previous
                 command then strip line end characters.
                 default on encode with single input line
                 and on hex decode without prefix.
                 does nothing when loading from a file.
      -tofile x  write output to file x.
      -dump      show output data as hexdump.

   see also
      sfk hexdump   produce hex data in many formats
      sfk hextobin  convert many hex formats to binary
      sfk uuencode  encode many files as plain text
      sfk md5       create checksum of file(s)

   web reference
      http://stahlworks.com/sfk-decode

   examples
      sfk encode in.jpg -base64 -tofile out.txt
         encodes in.jpg as base64, writing to out.txt
      sfk decode in.txt -base64 -tofile out.dat
         decodes in.txt from base64, writing to out.dat
      sfk echo -spat "foo bar" +encode -url
         produces: foo%20bar
      sfk echo "foo_20bar" +decode -_hex
         produces: foo bar
      sfk fromclip +decode -url
         make an url copied from a web page readable
         by changing "foo%20bar" to "foo bar".