I have a bash script which asks a user for the number of CPU cores and saves it to variable named
Now I want to add this variable to
.bashrc, so I ask user how many CPU cores he has and then if he wants to save this value to
Now the question: how can I check if
$cores already exists in
.bashrc so the script won't ask the user again?