mebens / unix-utils

Repository for the utility commands for the terminal I have/might/will make.

Home Page:http://www.nova-fusion.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository is home to the little utilities for the terminal I have/might/will make. Currently it only contains one, and that is strlen.

Directory Structure

In the bin folder you'll find the compiled utilities. In the src folder you'll find the source code for each utility.

strlen

strlen, as you can probably guess, tells you how many characters are in a string. You can use it like this:

$ strlen test test
9

by passing in arguments for the string. If you don't pass in any arguments, the program will proceed to take the contents from standard input:

$ strlen
Foo
Bar
Hello world!
^D
18

Don't enter the ^D of course, that's just a symbol for Ctrl+D. This allows you to do stuff like:

$ strlen < Some_File.txt
390
$ pbpaste | strlen # how long is the stuff on my clipboard?
65

There you go!

About

Repository for the utility commands for the terminal I have/might/will make.

http://www.nova-fusion.com


Languages

Language:C 100.0%