File: count.sh

package info (click to toggle)
remrun 0.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 444 kB
  • sloc: python: 775; sh: 629; makefile: 55
file content (13 lines) | stat: -rw-r--r-- 248 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
#
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

if [ "$#" -eq 0 ]; then
	echo 0
elif [ "$#" -eq 1 ]; then
	seq "$1" | tr -d '\n'
else
	echo 'Something weird going on here'
	exit 1
fi