Questions tagged [source-command]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
67 views

Why does the command 'source' have that name?

I wonder why a command that executes commands from a file in the current shell is named source. I can't see a relation between run commands in the current shell and the meaning of the english word ...
4
votes
3answers
1k views

How can I skip the rest of a script without exiting the invoking shell, when sourcing the script?

I have a bash script, where I call exit somewhere to skip the rest of the script when getopts doesn't recognize an option or doesn't find an expected option argument. while getopts ":t:" opt; do ...
3
votes
3answers
414 views

Parameters passed to a sourced script are wrong

A script on AIX which checks the number of parameters passed and complains if they are not correct:- if [ "$#" -ge 1 ]; then ... else echo 'Usage: myscript <a> [b] [c]' fi The script sets ...
1
vote
2answers
455 views

How to decrypt the file on the fly without process substitution?

I need to source the file by decrypting it on the fly using the below command. . <(gpg -qd "$encrypted_filename") sh is not supporting process substitution. I can't use bash. Please suggest some ...