What is the search path for a shell? What is the name of the shell variable that is used to maintain the search path for the Bourne Again and TC shell? Where (in which file) is this variable typically located? What is the search path set to in your environment? How did you find out? Set your search path so that your shell searches your current and your ~/bin directories while looking for a command that you type. In what order does your shell search the directories in your search path? Why?
What will be an ideal response?
The search path for a shell is the sequence of directories that the shell searches (one by one) to locate an external command. The Bourne Again shell use the variable called PATH for maintaining its search path and the TC shell uses the variable path for the same purpose.
You can use the echo $PATH command in Bash and echo $path command in the TC shell to determine the search path for your environment. The search path in our environment is shown in the output of these commands, as shown below.
$ echo $PATH
/usr/sbin:/usr/X11/include/X11:.:/users/faculty/sarwar/bin:/usr/ucb:/bin:/usr/bin:/usr/include:/usr/X11/lib:/usr/lib:/etc:/usr/etc:/usr/local/bin:/usr/local/lib:/usr/local/games:/usr/X11/bin
$
% echo $path
/usr/sbin /usr/X11/include/X11 . /users/faculty/sarwar/bin /usr/ucb /bin /usr/bin /usr/include /usr/X11/lib /usr/lib /etc /usr/etc /usr/local/bin /usr/local/lib /usr/local/games /usr/X11/bin
%
You should run the following command so that your shell searches your current as well as your ~/bin directories while looking for an external command that you type.
$ PATH=$PATH:~/bin:.
$
The order of search is: currently set search path, followed by your ~/bin directory, and then your current directory.
You might also like to view...
Which of the following statements is true of inline styles?
A) The inline style sheet is a separate document form the XHTML document. B) The style is defined within the Web page's head element. C) Changes to inline styles affect all other elements to which the style is applied. D) The style is contained within an XHTML document and defines the look of an individual element on the Web page using style attributes.
What did you observe in the TCPView window?
Step 1. Download Windows Sysinternals Suite.
a. Navigate to the following link to download Windows Sysinternals Suite:
https://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
b. After the download is completed, right+click the zip file, and choose Extract All…,
to extract the files from the folder. Choose the default name and destination in the
Downloads folder and click Extract.
c. Exit the web browser.
Step 2. Start TCP/UDP Endpoint Viewer.
a. Navigate to the SysinternalsSuite folder with all the extracted files.
b. Open Tcpview.exe. Accept the Process Explorer License Agreement when prompted.
Click Yes to allow this app to make changes to your device.
c. Exit the File Explorer and close all the currently running applications.
St