Set of files and scripts for Embedded Lab 1
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
272 B

  1. #!/bin/sh -
  2. dir="$1"
  3. pref="$2"
  4. start="$3"
  5. stop="$4"
  6. if [ -z "$dir" -o -z "$start" -o -z "$stop" ]; then
  7. echo "Usage: $0 <dir> <prefix> <start> <stop>" >&2
  8. exit 1
  9. fi
  10. mkdir -p "$dir"
  11. cd "$dir"
  12. for i in $(jot $(($stop - $start + 1)) "$start"); do
  13. mkdir "$pref$i"
  14. done