-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkcd
More file actions
executable file
·27 lines (25 loc) · 1.06 KB
/
Copy pathmkcd
File metadata and controls
executable file
·27 lines (25 loc) · 1.06 KB
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
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: mkcd
# Created: Sunday, 2023/09/17 - 23:40:05
# Author.: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Friday, 2026/08/07 - 09:06:14
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 0.0.2.18
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# > create a new directory and cd into it
# ############################################################################
# HISTORY:
#
# shellcheck disable=SC1090
source "$xSHELL_INIT"; xrequirements mkdir cd
if [ $# -eq 0 ]; then
echo "Usage: ${APP} <directory_name>"
exit 1
fi
{ mkdir -p $1 && cd $1; } || { echo "Failed to create and enter directory: $1"; exit 2; }