Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hcasl

Command line tool for "head -c N && shift 1 byte/char" loop.

License

zlib License.

Target environments

Windows, Linux, Mac OS X.

Probably it works fine on other OS.

Set up

hcasl is written in several programming languages. Choose one among them.

For ANSI C89/C99 implementation:

  1. Compile hcasl.c. Use make and Makefile.
  2. Put hcasl in a directory registered in PATH.
toolset Makefile
Linux Makefile
Mac OS X Makefile_mac
MinGW/TDM-GCC (with GNU make) Makefile_mingw
MinGW-w64/TDM64-GCC (32bit binary) Makefile_mingw64_32bit

For C++11 implementation:

  1. Compile hcasl.cpp. Use make and Makefile.
  2. Put hcasl in a directory registered in PATH.
toolset Makefile
Linux Makefile
Mac OS X Makefile_mac
MinGW/TDM-GCC (with GNU make) Makefile_mingw
MinGW-w64/TDM64-GCC (32bit binary) Makefile_mingw64_32bit

For Go 1.4 implementation:

  1. Install Go 1.4.2 or later.
  2. Compile hcasl.go (go build hcasl.go).
  3. Put hcasl in a directory registered in PATH.
  4. (Optional) Compile hcasl-char.go, and then put hcasl-char in a directory registered in PATH.

For Perl 5 implementation:

  1. Install Perl 5.14.2 or later.
  2. Put hcasl in a directory registered in PATH.

For Python 2.x implementation:

  1. Install Python 2.7.3 or later.
  2. Put hcasl in a directory registered in PATH.

For Ruby implementation:

  1. Install Ruby 1.9.3p0 or later.
  2. Put hcasl in a directory registered in PATH.
  3. (Optional) Put hcasl-char in a directory registered in PATH.

For Scheme/Gauche implementation:

  1. Install Gauche 0.9.4 or later.
  2. Put hcasl in a directory registered in PATH.
  3. (Optional) Put hcasl-char in a directory registered in PATH.

For Tcl 8.6 implementation:

  1. Install Tcl 8.6.4-5 or later.
  2. Put hcasl-char in a directory registered in PATH.

Usage

Please check help message hcasl -h or hcasl-char -h

Example

$ echo -n '' | hcasl
$ echo -n 1234567 | hcasl
$ echo -n 12345678 | hcasl
12345678
$ echo -n 123456789 | hcasl
12345678
23456789
$ echo -n abc | hcasl -n 1
a
b
c
$ echo -n abc | hcasl -n 2
ab
bc
$ echo -n abc | hcasl -n 3
abc
$ echo -n abc | hcasl -n 4
$ echo -n 123456789 | hcasl
12345678
23456789
$ echo -n 123456789 | hcasl -o output.txt
$ cat output.txt
12345678
23456789
$ _

About

Command line tool for "head -c N && shift 1 byte/char" loop

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages