1

Here is sample code:

    while IFS= read var
    do
    shopt -s expand_aliases
    alias fin="cd /directory/"
    fin
    done

Result:

    script.sh: line 53: fin: command not found

I am using var in other command. My concern here is that, after running script the error occurs.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.