System information
An Introduction to Shells in General
Axis Communications AB provides NO support for application development of any kind. The information
here is provided "as is", and there is no guarantee that any of the examples shown will work in your
particular application.
Revision 1.02 October 2002 45
5.3.5 cut
Syntax: cut [OPTION]... [FILE]...
Prints selected fields from each input FILE to standard output.
Options:
-b LIST Output only bytes from LIST
-c LIST Output only characters from LIST
-d CHAR Use CHAR instead of tab as the field delimiter
-s Output only the lines containing delimiter
-f N Print only these fields
-n Ignored
Example:
$ echo "Hello world" | cut -f 1 -d ' '
Hello
$ echo "Hello world" | cut -f 2 -d ' '
world
5.3.6 date
Syntax: date [OPTION]... [+FORMAT]
Displays the current time in the given FORMAT, or sets the system date.
Options:
-R Outputs RFC-822 compliant date string
-d STRING display time described by STRING, not `now'
-s Sets time described by STRING
-u Prints or sets Coordinated Universal Time
Example:
$ date
Wed Apr 12 18:52:41 MDT 2000
5.3.7 dd
Syntax: dd [if=FILE] [of=FILE] [bs=N] [count=N]
[skip=N][seek=N][conv=notrunc|sync]
Copy a file, converting and formatting according to options
if=FILE read from FILE instead of stdin
of=FILE write to FILE instead of stdout
bs=N read and write N bytes at a time
count=N copy only N input blocks
skip=N skip N input blocks
seek=N skip N output blocks
conv=notrunc don't truncate output file
conv=sync pad blocks with zeros
Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),
MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824).
Example:
$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
4+0 records in