minor changed

This commit is contained in:
Pin
2022-03-30 20:46:00 -04:00
parent 6353a6b7fd
commit c6e8e87baf

2
msh.c
View File

@@ -134,7 +134,7 @@ char *getPrompt() {
close(STDERR_FILENO); // Do not print errors to the screen
execlp("bash", "bash", "-i", "-c", "\
ver=$(bash --version | head -n 1 | awk \'{print $4}\' | grep -o \"...\");\
ver=$(bash --version | head -n 1 | awk \'{print $4}\' | grep -o \".\\..\");\
check_ver=$(echo -e \"${ver}\n4.3\" | sort -V | head -n 1);\
if [[ \"${ver}\" == \"${check_ver}\" ]]; then\
echo \"[${USER}]\";\