Skip to content
Trang chủ » Bash: Obtain Script Directory Using Simple Methods

Bash: Obtain Script Directory Using Simple Methods

[ 100% FIXED ]  bash: cd: _ : No such file or directory

Bash Get Script Directory

Understanding the Concept of “Get Script Directory” in Bash

In Bash scripting, it is often necessary to determine the directory in which the script itself is located. This is commonly known as the “get script directory” or “get script path” functionality. By knowing the script directory, we can perform various tasks such as accessing other files in the same directory or navigating to different directories based on the script’s location.

Extracting the Directory Path Using the “$0” Variable

The simplest way to obtain the script directory is by utilizing the special variable “$0”. This variable holds the name of the script as provided on the command line. By extracting the directory path from the “$0” variable, we can determine the script directory.

To accomplish this, we can use the “dirname” command, which removes the last component from a file path, hence providing us with the directory. Here’s an example:

“`
#!/bin/bash

script_dir=$(dirname “$0”)
echo “Script directory: $script_dir”
“`

In this example, the “dirname” command is applied to “$0” within double quotes. The resulting directory path is then stored in the “script_dir” variable, which is subsequently echoed to the console.

Handling Symbolic Links and Getting the Actual Script Directory

Sometimes, a script is executed through a symbolic link that points to the actual script file. In such cases, using “$0” and the “dirname” command alone may give us the directory of the symbolic link rather than the actual script.

To retrieve the actual script directory, a common approach is to use the “readlink” command, which resolves symbolic links and outputs the original file path. Here’s an updated example:

“`
#!/bin/bash

script_path=$(readlink -f “$0”)
script_dir=$(dirname “$script_path”)
echo “Actual script directory: $script_dir”
“`

By using the “readlink” command with the “-f” option, we obtain the actual script path in the “script_path” variable. We can then extract the directory path using the “dirname” command as before.

Determining the Absolute Path of the Script Directory

In some cases, we may need the absolute path of the script directory instead of the relative path. The absolute path provides the complete path from the root directory, making it more reliable and consistent across different environments.

To determine the absolute path of the script directory, we can combine the “pwd” command – which outputs the current working directory – with the relative script directory path obtained using “$0” and “dirname”. Here’s an example:

“`
#!/bin/bash

relative_dir=$(dirname “$0”)
absolute_dir=$(cd “$relative_dir” && pwd)
echo “Absolute script directory: $absolute_dir”
“`

In this example, the “cd” command changes the directory to the relative script directory, and the “pwd” command is then used to obtain the absolute path. Notice the use of double quotes to handle spaces and special characters that may be present in the path.

Dealing with Spaces and Special Characters in the Script Directory Path

Paths containing spaces or special characters present a challenge when working with the script directory. Failure to account for these characters can lead to unexpected behavior or errors in the script.

To handle spaces and special characters in the script directory path, it is important to properly quote or escape the variables involved. This ensures that the path is correctly interpreted by the shell.

For example, when using “$0” or “$script_path”, enclose the variable within double quotes:

“`
script_dir=$(dirname “$0”)
“`

Similarly, when changing directories or accessing files within the script directory, use double quotes:

“`
cd “$script_dir”
“`

By following this approach, spaces and special characters will be treated as part of the path rather than causing issues.

Getting the Parent Directory of the Script Directory

There may be situations where we need to access the parent directory of the script directory. This can be achieved by using the “dirname” command twice – first to obtain the script directory, and then again to retrieve its parent directory.

Here’s an example that demonstrates how to get the parent directory:

“`
#!/bin/bash

script_dir=$(dirname “$0”)
parent_dir=$(dirname “$script_dir”)
echo “Parent directory: $parent_dir”
“`

In this example, the “dirname” command is applied twice – once to “$0” to obtain the script directory, and then again to “$script_dir” to get the parent directory. The resulting parent directory path is then printed to the console.

Retrieving the Current Working Directory from Within the Script

The current working directory refers to the directory in which the script is executed. It may or may not be the same as the script directory, depending on the context and how the script is invoked.

To retrieve the current working directory from within the script, we can use the “pwd” command. Here’s a simple example:

“`
#!/bin/bash

cwd=$(pwd)
echo “Current working directory: $cwd”
“`

In this example, the “pwd” command is assigned to the “cwd” variable, and the variable is then echoed to display the current working directory.

Recognizing the Difference Between Script Directory and Current Working Directory

It is essential to understand the distinction between the script directory and the current working directory. The script directory represents the location of the script file itself, while the current working directory is the directory from which the script is executed.

They may or may not be the same depending on how the script is invoked. For instance, if the script is executed by providing an absolute or relative path and changing the working directory beforehand, the script directory and current working directory will differ.

Best Practices for Using and Referencing the Script Directory in Bash Scripts

When working with the script directory in Bash, it is important to follow certain best practices to ensure accurate and reliable script execution:

1. Always use “$0” or “$script_path” with the “dirname” command to obtain the script directory.
2. Handle spaces and special characters in the script directory path by quoting or escaping the variables involved.
3. Consider potential differences between the script directory and the current working directory, especially when accessing files or changing directories.
4. Use the “readlink” command to retrieve the actual script path when dealing with symbolic links.
5. Determine whether the absolute or relative path of the script directory is needed and use the appropriate approach.
6. When accessing files or directories within the script directory, use the obtained directory path in combination with proper quoting to ensure correct interpretation.

FAQs

Q1: How can I extract the filename from a given file path in Bash?
A1: To extract the filename from a file path, you can use the “basename” command. For example, if the file path is stored in a variable called “file_path”, you can extract the filename as follows:
“`
filename=$(basename “$file_path”)
“`

Q2: How can I get the parent directory of a given file or directory path in Bash?
A2: To get the parent directory of a file or directory path, you can use the “dirname” command. For example, if the path is stored in a variable called “path”, you can retrieve the parent directory as follows:
“`
parent_dir=$(dirname “$path”)
“`

Q3: How can I get the current directory within a Bash script?
A3: To retrieve the current working directory from within a Bash script, you can use the “pwd” command. For example:
“`
current_dir=$(pwd)
“`

Q4: How can I get the directory from a file path in Bash?
A4: To extract the directory from a file path, you can use the “dirname” command. For example, if the file path is stored in a variable called “file_path”, you can obtain the directory as follows:
“`
directory=$(dirname “$file_path”)
“`

Q5: How can I get the absolute path of a Bash script?
A5: To determine the absolute path of a Bash script, you can combine the “cd” command with the “pwd” command. For example:
“`
cd “$(dirname “$0″)” && absolute_path=$(pwd)/”$(basename “$0″)”
“`

Q6: How can I get the current directory within a batch script?
A6: In a Windows batch script, you can use the “%CD%” environment variable to obtain the current directory. For example:
“`
set current_dir=%CD%
“`

Q7: How can I get the script directory in Zsh?
A7: In Zsh, you can use the “$0:A:h” syntax to obtain the script directory. For example:
“`
script_directory=${0:A:h}
“`

Q8: How can I change the working directory to the script directory in Bash?
A8: To change the working directory to the script directory, you can use the “cd” command in combination with the “dirname” command. Here’s an example:
“`
cd “$(dirname “$0″)”
“`

In conclusion, understanding and effectively utilizing the “get script directory” functionality in Bash scripts opens up numerous possibilities for accessing files, navigating directories, and ensuring script portability. By following best practices and using the appropriate commands and variables, you can confidently work with script directories in your Bash scripts.

[ 100% Fixed ] Bash: Cd: _ : No Such File Or Directory

Keywords searched by users: bash get script directory Bash get filename from path, bash get parent directory, Bash script get current directory, Get directory from file path Bash, bash get script absolute path, Batch script get current directory, zsh get script directory, bash cd to script directory

Categories: Top 74 Bash Get Script Directory

See more here: nhanvietluanvan.com

Bash Get Filename From Path

Bash is a popular scripting language used in Unix-like operating systems, known for its powerful features and versatility. One common task performed in Bash scripts is to extract the filename from a given path. In this article, we will explore different methods to achieve this and provide you with a comprehensive understanding of how to get the filename from a path in Bash.

Methods to Get Filename from Path in Bash

Method 1: Using the ‘basename’ Command

The ‘basename’ command is a built-in utility in Bash that can be used to extract the filename from a path. By simply providing the path as an argument to the ‘basename’ command, you can obtain the filename. Here’s an example:

“`bash
path=”/home/user/documents/file.txt”
filename=$(basename “$path”)
echo “$filename”
“`

In this example, the ‘basename’ command is used to assign the extracted filename to the variable ‘filename’, which is then printed using the ‘echo’ command.

Method 2: Using the ‘${parameter##word}’ Expansion

Bash provides a powerful parameter expansion feature that can be utilized to extract the filename from a path. By using the ‘${parameter##word}’ expansion, where ‘parameter’ is the given path and ‘##word’ removes the longest matching pattern from the beginning, we can isolate the filename. Take a look at the following example:

“`bash
path=”/home/user/documents/file.txt”
filename=”${path##*/}”
echo “$filename”
“`

Here, the pattern ‘*/’ matches everything until the last forward slash, and by removing this pattern using ‘${parameter##*/}’, we obtain the filename.

Method 3: Using the ‘grep’ Command

The ‘grep’ command, primarily used for pattern searching, can also be employed to extract the filename from a path by searching for the last occurrence of the forward slash. Here is an example:

“`bash
path=”/home/user/documents/file.txt”
filename=$(echo “$path” | grep -o ‘[^/]*$’)
echo “$filename”
“`

Here, the ‘grep -o’ option is used to only output the matched pattern. The regular expression ‘[^/]*$’ matches everything until the end that is not a forward slash, effectively giving us the filename.

FAQs

Q1: Are these methods limited to specific file extensions?
A1: No, the methods discussed here can extract the filename regardless of the file extension. The focus is on isolating the filename from the path.

Q2: Can I use these methods to handle paths with spaces?
A2: Yes, all the methods mentioned above can handle paths with spaces. Quotes are used around variables and arguments to ensure that spaces are treated as part of the text rather than separators.

Q3: Are there any limitations when extracting filenames from complex paths?
A3: While the methods discussed work well for most paths, complex paths that include multiple subdirectories might require additional handling. Understanding the structure of the path is crucial for accurate extraction.

Q4: Can these methods be combined with other string manipulation operations?
A4: Certainly! Bash offers a wide range of string manipulation capabilities. You can combine the methods mentioned above with other string operations such as substitution, slicing, length calculation, and more.

Q5: Are there any performance considerations when using these methods?
A5: While the performance impact is minimal for small to medium-sized paths, using specific methods may have slight performance variations. However, these differences are usually negligible unless dealing with an exceptionally large number of paths.

Q6: Can I extract the directory path instead of the filename using these methods?
A6: Absolutely! By incorporating slight modifications to the methods discussed, such as using the ‘dirname’ command instead of ‘basename’ or changing the pattern, you can easily extract the directory path from a given path.

In conclusion, extracting the filename from a path in Bash can be accomplished using various approaches like ‘basename’, parameter expansion, or the ‘grep’ command. These methods provide flexibility and ease of use depending on your specific requirements. By understanding the techniques shared in this article and experimenting with different approaches, you can confidently tackle filename extraction from paths in your Bash scripts.

Bash Get Parent Directory

Bash, or the Bourne Again SHell, is a powerful command-line interpreter used in many Unix-based operating systems such as Linux and macOS. It provides users with a wide range of features and capabilities that can greatly enhance their efficiency in the command-line environment. One common task that bash users often encounter is finding the parent directory of a given path. In this article, we will explore various techniques and commands to achieve this, and answer frequently asked questions related to this topic.

Understanding Directory Paths
Before diving into the various methods of obtaining the parent directory, it is essential to understand the concept of directory paths. In the Unix file system, directories are structured hierarchically in a tree-like structure. Each directory can contain files and other subdirectories, forming a parent-child relationship. A directory path represents the location of a file or a directory within this hierarchy, starting from the root directory.

The root directory, denoted by a forward slash (“/”), serves as the ultimate parent directory. Any directory directly beneath the root directory is considered a child directory. For example, the directory path “/home/user/Documents” has “/home/user” as its parent directory.

Using the “dirname” Command
The simplest and most straightforward way to obtain the parent directory in bash is by using the “dirname” command. The “dirname” command takes a path as an argument and returns the parent directory of that path. Here’s an example:

“`bash
$ dirname /home/user/Documents
/home/user
“`

In this example, the “dirname” command returns “/home/user,” which is the parent directory of “/home/user/Documents.” The “dirname” command is particularly useful when dealing with specific paths stored in variables or when used in combination with other commands.

Using Parameter Expansion
Bash provides a feature called parameter expansion, which allows for string manipulation and extraction of parts of a string. By leveraging parameter expansion, we can extract the parent directory from a given path. Here’s an example:

“`bash
path=”/home/user/Documents”
parent_dir=”${path%/*}”
echo “$parent_dir”
“`

In this example, we assign the path “/home/user/Documents” to the variable “path.” The expression “${path%/*}” removes everything after the last forward slash, effectively leaving us with the parent directory. The resulting output will be “/home/user.”

Using the “cd” Command
Another approach to obtaining the parent directory of a given path is by using the “cd” command. The “cd” (change directory) command allows us to navigate through the directory structure. By combining “cd” with the “..” notation, we can easily traverse to the parent directory. Here’s an example:

“`bash
$ cd /home/user/Documents
$ cd ..
$ pwd
/home/user
“`

In this example, we first change our current directory to “/home/user/Documents” using the “cd” command. Then, by executing “cd ..,” we navigate to the parent directory. Finally, the “pwd” command displays the current working directory, which will be the parent directory.

FAQs:

Q: Can I get the parent directory of the current working directory?
A: Yes, you can. Using the “dirname” command with the “.” symbol as the path argument will give you the parent directory of the current working directory. Alternatively, the “pwd” command combined with “cd ..” can also achieve the same result.

Q: What if the path contains symbolic links?
A: When dealing with symbolic links, the “dirname” command and parameter expansion techniques will follow the path of the symbolic link and return the parent directory accordingly. However, using “cd ..” will traverse to the parent directory regardless of symbolic links.

Q: How can I get the parent directory in a script?
A: To get the parent directory in a script, you can use any of the mentioned techniques based on your requirements. However, storing the result in a variable is usually preferred to further utilize it within the script.

Q: Is it possible to get the grandparent directory?
A: Yes, it is possible. By applying the same techniques discussed earlier recursively, you can obtain the grandparent directory or even higher-level parent directories.

In conclusion, obtaining the parent directory in bash can be accomplished through various techniques, including the “dirname” command, parameter expansion, and “cd” command. Understanding these methods allows users to efficiently navigate and manipulate the file system hierarchy in Unix-based operating systems. Whether you are a beginner or an experienced user, having a clear understanding of these techniques is crucial for effective command-line usage.

Bash Script Get Current Directory

Bash Script: Get Current Directory

In the world of scripting and automation, being able to determine the current directory is often crucial. Whether you are developing complex software or simply executing a series of commands, knowing your current working directory helps in ensuring the smooth execution of your scripts. In this article, we will explore how to get the current directory in a Bash script, providing you with a comprehensive understanding of this important task.

Understanding the Current Directory
Before delving into retrieving the current directory, it is important to understand what it represents. The current directory is the directory in which the command is currently being executed. It serves as the reference location for any file or directory operations carried out within a script.

Retrieving the Current Directory
There are several ways to obtain the current directory within a Bash script. Here, we will outline three commonly used methods:

Method 1: Using the “$PWD” Variable
One straightforward approach is to use the “$PWD” variable, which holds the current directory. By referencing this variable, you can retrieve the path to your present working directory. Consider the following example:

“`bash
#!/bin/bash

current_dir=$PWD

echo “The current directory is: $current_dir”
“`

Executing the script will display the current directory on the terminal.

Method 2: Utilizing the `pwd` Command
Another way to get the current directory is by using the `pwd` command. This command prints the current working directory on the standard output. By capturing its output using command substitution, you can assign the value to a variable. Here is an example:

“`bash
#!/bin/bash

current_dir=$(pwd)

echo “The current directory is: $current_dir”
“`

Running this script will yield the same result as the previous method – displaying the working directory on the screen.

Method 3: Employing the `dirname` Command
The `dirname` command isolates the directory component of a given path. By passing the special parameter “$0” (which contains the script’s name) to `dirname`, you can obtain the directory path in which the script itself resides. This method is useful when the main focus is on the script’s location rather than the current working directory. Take a look at the following example:

“`bash
#!/bin/bash

current_dir=$(dirname “$0”)

echo “The script is located in: $current_dir”
“`

Executing this script will display the directory path that houses the script.

FAQs about Getting the Current Directory in Bash Scripts

Q: Does the method used to retrieve the current directory depend on the script’s location?
A: Yes, it does. If you need to know the absolute path of the script itself, Method 3 using the `dirname` command is preferable. However, if you simply want to determine the current working directory, either Method 1 or 2 can be used.

Q: Can the current directory change during script execution?
A: Yes, it is possible for the current directory to change. If a script or command within the script modifies the current directory, the value retrieved at the beginning of the script may differ from the value obtained at a later point. It is important to account for this possibility.

Q: Which method should I choose?
A: The method you choose depends on your specific requirements. If you are concerned with the script’s location, Method 3 using `dirname` is suitable. However, if you need the current working directory no matter where the script is located, either Method 1 or 2 will be appropriate.

Q: Can I use these methods in other programming languages?
A: The methods described in this article are specific to Bash scripting. However, similar strategies can be employed in other programming languages with slight variations in syntax.

In conclusion, obtaining the current directory is a fundamental task when working with Bash scripts. By utilizing the methods outlined in this article, you can ensure that your scripts accurately reference the working directory, facilitating the smooth execution of commands and operations.

Images related to the topic bash get script directory

[ 100% FIXED ]  bash: cd: _ : No such file or directory
[ 100% FIXED ] bash: cd: _ : No such file or directory

Found 14 images related to bash get script directory theme

Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
How To Find The Directory Where A Bash Script Is Located From Within The  Script
How To Find The Directory Where A Bash Script Is Located From Within The Script
The Right Way To Get The Directory Of A Bash Script | The Ostrich
The Right Way To Get The Directory Of A Bash Script | The Ostrich
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
Bash Get Basename Of Filename Or Directory Name - Nixcraft
Bash Get Basename Of Filename Or Directory Name – Nixcraft
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
Implementing Directory Management Using Shell Script - Geeksforgeeks
Implementing Directory Management Using Shell Script – Geeksforgeeks
Shell Script To See Current Date,Time, User And Current Directory - Youtube
Shell Script To See Current Date,Time, User And Current Directory – Youtube
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
How To Get The Source Directory Of A Bash Script From Within The Script -  Youtube
How To Get The Source Directory Of A Bash Script From Within The Script – Youtube
Shell - How To Execute A Bash Script, With It'S Arguments, On Multiple  Directories? - Unix & Linux Stack Exchange
Shell – How To Execute A Bash Script, With It’S Arguments, On Multiple Directories? – Unix & Linux Stack Exchange
Shell Script To Delete A File From Every Directory Above The Present  Working Directory - Geeksforgeeks
Shell Script To Delete A File From Every Directory Above The Present Working Directory – Geeksforgeeks
Solved Task A - Create A New Directory Write A Shell Script | Chegg.Com
Solved Task A – Create A New Directory Write A Shell Script | Chegg.Com
How To Change Folder With Git Bash? - Stack Overflow
How To Change Folder With Git Bash? – Stack Overflow
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
How To Use Bash Get Script Directory In Linux | Diskinternals
How To Use Bash Get Script Directory In Linux | Diskinternals
Get Bash Script Filename | Delft Stack
Get Bash Script Filename | Delft Stack
How To Check If A File Or Directory Exists In A Bash Shell Script
How To Check If A File Or Directory Exists In A Bash Shell Script
Shell Scripting For Beginners – How To Write Bash Scripts In Linux
Shell Scripting For Beginners – How To Write Bash Scripts In Linux
How To Run Bash Script In Linux? - Geeksforgeeks
How To Run Bash Script In Linux? – Geeksforgeeks
Batch File - Windows Shell Command To Get The Full Path To The Current  Directory? - Stack Overflow
Batch File – Windows Shell Command To Get The Full Path To The Current Directory? – Stack Overflow
How To Check If A File Or Directory Exists In Bash
How To Check If A File Or Directory Exists In Bash
Back Up A Directory In Linux Using A Shell Script
Back Up A Directory In Linux Using A Shell Script
Write A Script Using The Bash Shell To Find And Print | Chegg.Com
Write A Script Using The Bash Shell To Find And Print | Chegg.Com
How To Get Home Folder Of A User Running Script As Sudo
How To Get Home Folder Of A User Running Script As Sudo
Bash Cheat Sheet Updated For 2023 - From Basics To Shell Builtins
Bash Cheat Sheet Updated For 2023 – From Basics To Shell Builtins
Bash Script Check File And Directory ~ Zimbra Mail Server,Linux,Bash Script,Centos,Linux  Command
Bash Script Check File And Directory ~ Zimbra Mail Server,Linux,Bash Script,Centos,Linux Command
Shell Script To Display Files And Folders - Youtube
Shell Script To Display Files And Folders – Youtube
Errors Executing Bash Script: Permission Denied; No Such File Or Directory  - Ask Ubuntu
Errors Executing Bash Script: Permission Denied; No Such File Or Directory – Ask Ubuntu
Top 51 Get Script Directory Bash Update
Top 51 Get Script Directory Bash Update
Find The Current Folder Name In Bash | Delft Stack
Find The Current Folder Name In Bash | Delft Stack
Build A Build Script: ./Script.Sh : /Bin/Bash : Bad Interpreter : No Such  File Or Directory - Command Line - Codecademy Forums
Build A Build Script: ./Script.Sh : /Bin/Bash : Bad Interpreter : No Such File Or Directory – Command Line – Codecademy Forums
How To Find A Directory Exists Or Not Using Linux Shell Script |  Linux.K2Schools.Com
How To Find A Directory Exists Or Not Using Linux Shell Script | Linux.K2Schools.Com
30 Bash Script Examples | Pdf | Parameter (Computer Programming) | Control  Flow
30 Bash Script Examples | Pdf | Parameter (Computer Programming) | Control Flow
How To Run A Bash Script – Devconnected
How To Run A Bash Script – Devconnected
Shell - How Do I Launch A Git Bash Window With Particular Working Directory  Using A Script? - Stack Overflow
Shell – How Do I Launch A Git Bash Window With Particular Working Directory Using A Script? – Stack Overflow
Mindepth And Maxdepth In Linux Find() Command For Limiting Search To A  Specific Directory. - Geeksforgeeks
Mindepth And Maxdepth In Linux Find() Command For Limiting Search To A Specific Directory. – Geeksforgeeks
How To Run .Sh Or Shell Script File In Windows 11/10
How To Run .Sh Or Shell Script File In Windows 11/10
Solved Need Help With Creating The Bash Script For Number 3 | Chegg.Com
Solved Need Help With Creating The Bash Script For Number 3 | Chegg.Com
Top 51 Get Script Directory Bash Update
Top 51 Get Script Directory Bash Update
Solved: This Is A Linux Class. Write A Bash Shell Script Named Info.Sh. The  Command For Execution Must Include Two Command-Line Parameters: The Name Of  The File That Will Be Displayed And
Solved: This Is A Linux Class. Write A Bash Shell Script Named Info.Sh. The Command For Execution Must Include Two Command-Line Parameters: The Name Of The File That Will Be Displayed And
Solved: This Is A Linux Class. Write A Bash Shell Script Named Info.Sh. The  Command For Execution Must Include Two Command-Line Parameters: The Name Of  The File That Will Be Displayed And
Solved: This Is A Linux Class. Write A Bash Shell Script Named Info.Sh. The Command For Execution Must Include Two Command-Line Parameters: The Name Of The File That Will Be Displayed And
Bash Scripting Tutorial – Linux Shell Script And Command Line For Beginners
Bash Scripting Tutorial – Linux Shell Script And Command Line For Beginners
List Directory Contents Without Using Ls Command - Ostechnix
List Directory Contents Without Using Ls Command – Ostechnix
Get The Absolute Path Of A Script In Bash
Get The Absolute Path Of A Script In Bash
Bash Scripting: Check If Directory Exists - Linux Tutorials - Learn Linux  Configuration
Bash Scripting: Check If Directory Exists – Linux Tutorials – Learn Linux Configuration
How To Check If A Directory Exists In Bash Shell Script - Tuts Make
How To Check If A Directory Exists In Bash Shell Script – Tuts Make
Bash Script To Put Files In The Trash - Youtube
Bash Script To Put Files In The Trash – Youtube
Mindepth And Maxdepth In Linux Find() Command For Limiting Search To A  Specific Directory. - Geeksforgeeks
Mindepth And Maxdepth In Linux Find() Command For Limiting Search To A Specific Directory. – Geeksforgeeks

Article link: bash get script directory.

Learn more about the topic bash get script directory.

See more: https://nhanvietluanvan.com/luat-hoc/

Leave a Reply

Your email address will not be published. Required fields are marked *