I thought I will write a bash script to set the alias I frequently use, and also to change the command promt.
Below is my script.
#!/bin/bash
# Make useful aliases
alias c='clear'
alias p='pwd'
alias d='pwd'
alias l='ls -l'
alias clp='clear;pwd'
# Prompt
PS1='unix % '
# Echo to check if script runing
echo 'Hello world'
But when I run this script(after giving it execute permission) the alias are not added. Neither is the prompt updated with the value given for PS1. Nonetheless it echoes Hello world
so it looks like the script is running.
user $ ./myEnv.sh
Hello world
user $ d
d: command not found
user $
Where is the mistake ?