This repository was archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirinfo
57 lines (41 loc) · 1.4 KB
/
dirinfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# dirinfo: Print the current working directory and its contents
# ============
# INSTRUCTIONS
# ============
# 1. Below the "Command A", place either the answer from Task 1 or Task 2
# (both do the same thing)
#
# 2. Below the "Command B", place a command with 2+ arguments of choice that
# lists the contents of the current working directory.
# ==============
# Example Output
# ==============
#
# NOTE: Part below "--- Contents ---" varies. Yours does not need
# to look the same as below. Make it how YOU want it to look.
#
# $ dirinfo
# CWD: /homes/kkohlmor/cs190lab3
#
# --- Contents ---
# drwx--S--- 3 kkohlmor kkohlmor 4096 Oct 29 04:24 .
# drwx--S--x 42 kkohlmor kkohlmor 4096 Oct 29 04:22 ..
# -rw-r----- 1 kkohlmor kkohlmor 1249 Oct 28 19:47 .bash_profile
# -rwxr-x--- 1 kkohlmor kkohlmor 744 Oct 28 19:49 .bashrc
# drwx--S--- 7 kkohlmor kkohlmor 4096 Oct 29 04:22 .git
# -rw-r----- 1 kkohlmor kkohlmor 1585 Oct 29 02:14 .zshrc
# -rw-r----- 1 kkohlmor kkohlmor 198 Oct 29 03:45 README.md
# -rw-r----- 1 kkohlmor kkohlmor 201 Oct 29 04:22 dirinfo
# -rwxr-x--- 1 kkohlmor kkohlmor 1341 Oct 29 01:39 install.sh
# ====================================================
# Actual Script
# ====================================================
# ---------
# Command A
# ---------
# ignore
echo -e '\n--- Contents ---'
# ---------
# Command B
# ---------