Bash scripts

Tasks

Task 1. Write a script that will convert PLN to USD and back (with a fixed rate). Assume that by default we convert USD → PLN, give an option for user to change the direction.

Task 2. Write (in pure bash) a script that will act like the factor command.

Task 3. Write a script that will list contents of directory in a nice way. In particular a directory tree like this:

.
├── dir1
│   ├── dirA
│   │   └── fileA
│   ├── file1
│   ├── file2
│   └── file3
├── dir2
│   ├── file1
│   ├── file2
│   ├── file3
│   └── file4
└── dir3
    ├── file1
    └── file2

might be displayedi, e.g., like this:

Directory: dir1
  Directory: dirA
    File: fileA
  File: file1
  File: file2
  File: file3
Directory: dir2
  File: file1
  File: file2
  File: file3
  File: file4
Directory: dir3
  File: file1
  File: file2