Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion bash_project/.bash_profile
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
# your solution here...
#!/bin/bash
echo "Hello $USER"
export COURSE_ID=DevOpsBootcampElevation

if [ -f ~/.token ]
then
if [[ $(stat -c '%a' ~/.token) != "600" ]]
then
echo "Warning: .token file has too open permissions"
fi
fi

# 666-006=660 -> 110 110 000
umask 0006

export PATH=$PATH:/home/$USER/usercommands

# UTC=-u , iso8601=-I or --iso-8601=seconds
# 2023-07-31T20:41:50+00:00
date -u --iso-8601=seconds

# all files with .txt extension -> ls *.txt
alias ltxt='ls *.txt'

if [ -d ~/tmp ]
then
rm -rf ~/tmp/*
else
mkdir ~/tmp
fi

PROCESS_ID=$(lsof -t -i :8080)
if [ $PROCESS_ID ]
then
kill -9 $PROCESS_ID
echo "killed process"
fi