I will try with egrep. For example, Windows has its shell that has it’s code, Unix systems have Bourne shell, C shell, etc. I am calling a unix shell script from a perl script by using the following system command: system("./readfile_new.sh"); but it seems the unix script readfile_new.sh is not being called. Beauty Tips | Health Tips | Interview Tips | Career Tips | Software Tips | Cooking Tips. source /path/to/the/theotherscript.sh argument1 Shell script is set of commands with variuos options. #!/bin/bash Running the script in a different process is like executing it from the command line. Firstly, you need to know how exactly you want the other script to run? /bin/sh /path/to/the/otherscript.sh. ' $1' the last column which ends with 1. You have several commands that allow you to run system commands the system command which wait for the command to finish and returns the output and exec which never returns. > I understand its not a command but how do I call this function insider my > shell script now. Perl is loosely based on the powerful ‘C’ programming language developed by Dennis Ritchie of Bell Labs in the early 1970s. All the regular expression which is possible in sed and awk is possible in Perl. Call the script as you would call from the command line. This is also useful when you want to call specific functions with in the sourced or other script.eval(ez_write_tag([[580,400],'lostsaloon_com-medrectangle-3','ezslot_2',118,'0','0'])); We are going to assume that you have the correct permissions to execute the scripts and that they are in the correct path. Writing shell scripts in perl is really easy. I would advise strongly against using the exec command, unless you really know what you are doing. # call the other script using absolute path, using source Last Modified: 2010-08-05. The source command is just an alias for the dot operator in bash. For example, you don’t want the callee to change the current working directory and the caller make a safe assumption about which working directory it is in after the script returns. Call the script as you would call from the command line. 1 Solution. Thanks again. Sometimes, the caller script (or parent) had already made some modifications to the environment and you want the callee to be able get those values. Any of these will solve that problem: Use Unix. You can only execute a Perl program that contains it. Yes, in principle, shell scripts can be sourced with "source