Having a "library" with constants and functions (lib.sh
), I can include it in my script (script.sh
)
. /myfolder/lib.sh
......
Is there a way to merge the included file in the script (i.e. replace ./myfolder/lib.sh
with the content of lib.sh
)?
bash
in your title if the content refers toksh
? – Chris Davies Jan 09 '17 at 14:31cat /myfolder/lib.ksh >> script.ksh
– Ipor Sircer Jan 09 '17 at 14:35>>
would put it at the end, where it is too late. – ctrl-alt-delor Jan 09 '17 at 14:44.
orsource
command with the corresponding contents? – Jeff Schaller Jan 09 '17 at 14:51