{"id":12996,"date":"2024-09-23T10:15:32","date_gmt":"2024-09-23T04:45:32","guid":{"rendered":"https:\/\/www.placementpreparation.io\/blog\/?p=12996"},"modified":"2025-02-27T12:37:28","modified_gmt":"2025-02-27T07:07:28","slug":"shell-scripting-interview-questions-for-freshers","status":"publish","type":"post","link":"https:\/\/www.placementpreparation.io\/blog\/shell-scripting-interview-questions-for-freshers\/","title":{"rendered":"Top Shell Scripting Interview Questions for Freshers"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Are you preparing for your first Shell Scripting interview and wondering what questions you might face?<\/p><p>Understanding the key Shell Scripting interview questions for freshers can give you more clarity.<\/p><p>With this guide, you&rsquo;ll be well-prepared to tackle these Shell Scripting interview questions and answers for freshers and make a strong impression in your interview.<\/p><h2><a href=\"https:\/\/www.guvi.in\/mlp\/fsd-student-program-wp?utm_source=placement_preparation&amp;utm_medium=blog_banner&amp;utm_campaign=shell_scripting_interview_questions_for_freshers_horizontal\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone wp-image-14310 size-full\" src=\"https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal.webp\" alt=\"fsd student program banner horizontal\" width=\"2270\" height=\"600\" srcset=\"https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal.webp 2270w, https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal-300x79.webp 300w, https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal-1024x271.webp 1024w, https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal-768x203.webp 768w, https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal-1536x406.webp 1536w, https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal-2048x541.webp 2048w, https:\/\/www.placementpreparation.io\/blog\/wp-content\/uploads\/2025\/01\/fsd-student-program-banner-horizontal-150x40.webp 150w\" sizes=\"(max-width: 2270px) 100vw, 2270px\"><\/a><\/h2><h2 id=\"practice-shell-scripting-interview-questions\">Practice Shell Scripting Interview Questions and Answers<\/h2><p>Below are the top 50 Shell scripting interview questions for freshers with answers:<\/p><h3 id=\"define-a-shell-script\">1. What is a Shell Script?<\/h3><p><strong>Answer:<\/strong><\/p><p>A shell script is a text file containing a series of commands for the shell to execute. It is typically used to automate repetitive tasks in Unix\/Linux systems. These scripts can include loops, conditionals, and functions.<\/p><h3 id=\"create-a-shell-script\">2. How do you create a shell script?<\/h3><p><strong>Answer:<\/strong><\/p><p>To create a shell script, use a text editor to write the script, starting with the shebang (<strong>#!\/bin\/bash<\/strong>). Save the file with a <strong>.sh<\/strong> extension, and give it executable permissions using<strong> chmod +x script.sh.<\/strong><br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n#!\/bin\/bash<br>\necho &ldquo;Hello, World!&rdquo;<br>\n<\/div><\/div><h3 id=\"explain-the-shebang\">3. What is the shebang (#!) in a shell script?<\/h3><p><strong>Answer: <\/strong><\/p><p>The shebang (<strong>#!<\/strong>) indicates the interpreter that should execute the script. For example, <strong>#!\/bin\/bash<\/strong> tells the system to use the Bash shell. It must be the first line in the script for the script to execute correctly.<\/p><h3 id=\"execute-a-shell-script\">4. How do you execute a shell script?<\/h3><p><strong>Answer:<\/strong><\/p><p>To execute a shell script, navigate to its directory and run it by typing <strong>.\/script_name.sh.<\/strong> Make sure it has the correct executable permissions (chmod +x).<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n.\/my_script.sh<br>\n<\/div><\/div><h3 id=\"describe-shell-variables\">5. What are shell variables?<\/h3><p><strong>Answer: <\/strong><\/p><p>Shell variables store data that can be reused within the script. Variables can store strings, numbers, and command outputs, and are typically assigned using <strong>VAR=value.<\/strong><br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nmy_var=&rdquo;Hello&rdquo;<br>\necho $my_var<br>\n<\/div><\/div><h3 id=\"local-and-global-variables\">6. What is the difference between local and global variables?<\/h3><p><strong>Answer: <\/strong><\/p><p>A local variable is confined to the function or script it is declared in, while a global variable can be accessed throughout the script or by other scripts. Local variables are declared using the<strong> local<\/strong> keyword inside a function.<\/p><h3 id=\"pass-arguments-to-script\">7. How do you pass arguments to a shell script?<\/h3><p><strong>Answer:<\/strong><\/p><p>You can pass arguments to a shell script by specifying them after the script name. These arguments can be accessed inside the script using <strong>$1<\/strong>,<strong> $2<\/strong>, and so on.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n#!\/bin\/bash<br>\necho &ldquo;First argument: $1&rdquo;<br>\n<\/div><\/div><h3 id=\"meaning-of-0\">8. What is $0 in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p><strong> $0<\/strong> holds the name of the script itself. This is useful when you need to refer to the script&rsquo;s name within itself for logging or help messages.<\/p><h3 id=\"read-user-input\">9. How do you read user input in a shell script?<\/h3><p><strong>Answer:<\/strong><\/p><p>Use the<strong> read<\/strong> command to capture user input during script execution. This allows interaction between the script and the user.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n#!\/bin\/bash<br>\nread -p &ldquo;Enter your name: &rdquo; name<br>\necho &ldquo;Hello, $name!&rdquo;<br>\n<\/div><\/div><h3 id=\"create-a-shell-function\">10. How do you create a function in a shell script?<\/h3><p><strong>Answer: <\/strong><\/p><p>Functions in shell scripts allow you to group commands into reusable blocks. A function is declared using the <strong>function<\/strong> keyword or just the function name followed by <strong>()<\/strong>.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nfunction greet {<br>\necho &ldquo;Hello, $1&rdquo;<br>\n}<br>\ngreet &ldquo;John&rdquo;<br>\n<\/div><\/div><h3 id=\"check-if-file-exists\">11. How do you check if a file exists in a shell script?<\/h3><p><strong>Answer:<\/strong><\/p><p>Use the -e operator with an if statement to check <strong>if<\/strong> a file exists. This is useful for handling files in conditional logic.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nif [ -e file.txt ]; then<br>\necho &ldquo;File exists&rdquo;<br>\nelse<br>\necho &ldquo;File does not exist&rdquo;<br>\nfi<br>\n<\/div><\/div><h3 id=\"difference-between-[-]\">12. What is the difference between [ ] and [[ ]] in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p><strong> [ ]<\/strong> is the test command that evaluates expressions, while <strong>[[ ]]<\/strong> is an enhanced test command that supports pattern matching and regular expressions, making it more powerful for conditionals.<\/p><h3 id=\"perform-string-comparison\">13. How do you perform string comparison in a shell script?<\/h3><p><strong>Answer: <\/strong><\/p><p>String comparison can be done using <strong>=<\/strong> and <strong>!=<\/strong> for equality and inequality checks. Use <strong>-z<\/strong> to check if a string is empty and <strong>-n<\/strong> to check if it is non-empty.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nif [ &ldquo;$str1&rdquo; = &ldquo;$str2&rdquo; ]; then<br>\necho &ldquo;Strings are equal&rdquo;<br>\nfi<br>\n<\/div><\/div><h3 id=\"use-of-echo-command\">14. What is the use of echo command in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>The echo command is used to print text or variables to the terminal. It is widely used for displaying messages, outputting the result of commands, or logging information during script execution.<\/p><h3 id=\"utilize-loops-in-scripting\">15. How do you use loops in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>Shell scripts support <strong>for<\/strong>, <strong>while<\/strong>, and <strong>until<\/strong> loops for repetitive execution of commands. Loops help in tasks like iterating through file lists or processing user input.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nfor i in {1..5}; do<br>\necho &ldquo;Iteration $i&rdquo;<br>\ndone<br>\n<\/div><\/div><h3 id=\"while-vs-until-loops\">16. What is the difference between while and until loops?<\/h3><p><strong>Answer:<\/strong><\/p><p>A<strong> while<\/strong> loop executes as long as the condition is true, while an <strong>until<\/strong> loop executes as long as the condition is false. The logic is inverted between the two.<\/p><h3 id=\"significance-of-exit-codes\">17. What is the significance of exit codes in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Exit codes determine the success or failure of a command. By convention, <strong>0<\/strong> represents success, and any non-zero code indicates an error. Scripts can use <strong>exit<\/strong> to specify custom exit codes.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nif [ &ldquo;$?&rdquo; -eq 0 ]; then<br>\necho &ldquo;Success&rdquo;<br>\nelse<br>\necho &ldquo;Failure&rdquo;<br>\nfi<br>\n<\/div><\/div><h3 id=\"handle-errors-in-scripting\">18. How do you handle errors in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>You can handle errors using conditional checks (<strong>if, &amp;&amp;, ||<\/strong>), or by using the <strong>set -e<\/strong> option, which makes the script exit on the first error. It ensures reliable script execution by halting on errors.<\/p><h3 id=\"write-comments-in-scripts\">19. How do you write comments in shell scripts?<\/h3><p><strong>Answer: <\/strong><\/p><p>Comments are written with a <strong>#<\/strong> symbol and are ignored by the shell. They are useful for documenting the script and making it easier to understand.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n# This is a comment<br>\n<\/div><\/div><h3 id=\"define-a-positional-parameter\">20. What is a positional parameter in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>Positional parameters allow you to pass arguments to a script. <strong>$1<\/strong>, <strong>$2<\/strong>, etc., represent the first, second, and subsequent arguments passed to the script. These help in handling user input or data processing.<\/p><h3 id=\"redirect-output-to-file\">21. How do you redirect output to a file in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Output can be redirected to a file using <strong>&gt;<\/strong> for overwriting and<strong> &gt;&gt;<\/strong> for appending. You can redirect both stdout and stderr for logging purposes.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nls &gt; output.txt<br>\n<\/div><\/div><h3 id=\"purpose-of-pipe-operator\">22. What is the pipe (|) operator in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>The pipe operator allows the output of one command to be used as input for another command. This helps in chaining commands together for complex data processing.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ncat file.txt | grep &ldquo;search&rdquo;<br>\n<\/div><\/div><h3 id=\"what-is-a-subshell\">23. What is a subshell in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>A subshell is a child shell process created to execute commands in isolation. Commands in parentheses <strong>()<\/strong> are executed in a subshell, allowing temporary scope for variables or commands.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n(result=$(ls))<br>\necho &ldquo;$result&rdquo;<br>\n<\/div><\/div><h3 id=\"explain-command-substitution\">24. What is command substitution in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Command substitution allows you to capture the output of a command and assign it to a variable or use it directly. This can be done using backticks (`) or<strong> $(&hellip;)<\/strong>.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ndate=$(date)<br>\necho &ldquo;Today&rsquo;s date: $date&rdquo;<br>\n<\/div><\/div><h3 id=\"understand-conditional-statements\">25. What are conditional statements in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>Conditional statements like <strong>if<\/strong>,<strong> elif<\/strong>,<strong> else<\/strong>, and <strong>case<\/strong> are used to execute different blocks of code based on the evaluation of an expression or variable.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nif [ &ldquo;$var&rdquo; = &ldquo;value&rdquo; ]; then<br>\necho &ldquo;Condition met&rdquo;<br>\nfi<br>\n<\/div><\/div><h3 id=\"schedule-with-cron-jobs\">26. How do you schedule a shell script to run at a specific time using cron?<\/h3><p><strong>Answer:<\/strong><\/p><p>You can schedule a shell script using the <strong>cron<\/strong> utility. Edit the <strong>crontab<\/strong> with crontab -e and add a line to define the schedule and the script to execute.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\n0 5 * * * \/path\/to\/script.sh<br>\n<\/div><\/div><h3 id=\"explain-environment-variables\">27. What are environment variables in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>Environment variables are system-wide variables that affect the behavior of running processes. Common environment variables include <strong>$PATH<\/strong>, <strong>$HOME<\/strong>, and <strong>$USER<\/strong>. They can be accessed and modified within a script.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\necho &ldquo;Home directory: $HOME&rdquo;<br>\n<\/div><\/div><h3 id=\"compare-=-and-==\">28. What is the difference between = and == in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>In shell scripting, <strong>=<\/strong> is used for assigning values to variables, while <strong>==<\/strong> is used for string comparison in some shells like Bash. In<strong> [ ]<\/strong>, use a single = for comparison.<\/p><h3 id=\"terminate-script-early\">29. How do you terminate a shell script early?<\/h3><p><strong>Answer: <\/strong><\/p><p>Use the<strong> exit<\/strong> command to terminate a shell script at any point. You can optionally provide an exit code to indicate the reason for termination.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nif [ &ldquo;$var&rdquo; -eq 0 ]; then<br>\nexit 1<br>\nfi<br>\n<\/div><\/div><h3 id=\"check-string-length\">30. How do you check the length of a string in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>You can check the length of a string using <strong>${#string}<\/strong> syntax. This is useful for validation, like ensuring user input meets length requirements.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nstr=&rdquo;Hello&rdquo;<br>\necho ${#str} # Outputs 5<br>\n<\/div><\/div><h3 id=\"use-break-and-continue\">31. What is the use of break and continue in loops?<\/h3><p><strong>Answer:<\/strong><\/p><p><strong> break<\/strong> exits the loop immediately, while <strong>continue<\/strong> skips the current iteration and moves to the next one. They control loop flow based on conditions.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nbash<br>\nCopy code<br>\nfor i in {1..5}; do<br>\nif [ $i -eq 3 ]; then<br>\ncontinue<br>\nfi<br>\necho &ldquo;N<br>\n<\/div><\/div><h3 id=\"declare-and-use-arrays\">32. How do you declare and use arrays in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Arrays store multiple values in a single variable. They are declared using parentheses, and individual elements are accessed using their index.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\narr=(&ldquo;apple&rdquo; &ldquo;banana&rdquo; &ldquo;cherry&rdquo;)<br>\necho ${arr[1]} # Outputs banana<br>\n<\/div><\/div><h3 id=\"debug-a-shell-script\">33. How do you debug a shell script?<\/h3><p><strong>Answer: <\/strong><\/p><p>You can debug a shell script using <strong>bash -x script.sh<\/strong>, which prints each command before executing it. Alternatively, use <strong>set -x<\/strong> within the script to debug specific sections.<\/p><h3 id=\"explain-here-documents\">34. What is a here document in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>A here document (<strong>&lt;&lt;<\/strong>) allows you to redirect multiple lines of input into a command. It&rsquo;s useful for feeding blocks of text or commands into scripts.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ncat &lt;&lt; EOF<br>\nHello, World!<br>\nEOF<br>\n<\/div><\/div><h3 id=\"trap-signals-in-scripting\">35. How do you trap signals in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>The <strong>trap<\/strong> command allows you to catch and handle signals like <strong>SIGINT<\/strong> (Ctrl+C). This is useful for cleaning up resources before a script terminates.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ntrap &ldquo;echo &lsquo;Interrupt signal received&rsquo;; exit&rdquo; SIGINT<br>\n<\/div><\/div><h3 id=\"check-if-directory-exists\">36. How do you check if a directory exists in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Use the <strong>-d<\/strong> operator in an <strong>if<\/strong> statement to check if a directory exists. This is helpful when managing directories within scripts.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nif [ -d \/path\/to\/directory ]; then<br>\necho &ldquo;Directory exists&rdquo;<br>\nfi<br>\n<\/div><\/div><h3 id=\"purpose-of-shift-command\">37. What is the purpose of shift in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p><strong>shift<\/strong> is used to shift positional parameters to the left. After a shift, <strong>$2<\/strong> becomes <strong>$1<\/strong>, <strong>$3<\/strong> becomes <strong>$2<\/strong>, and so on. This is useful for handling arguments in loops.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nshift # Shifts all arguments to the left<br>\n<\/div><\/div><h3 id=\"perform-arithmetic-operations\">38. How do you perform arithmetic operations in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Arithmetic operations can be performed using the <strong>expr<\/strong> command or double parentheses <strong>(( ))<\/strong>. This allows you to handle basic math within scripts.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nresult=$((5 + 3))<br>\necho $result # Outputs 8\n<\/div><\/div><h3 id=\"use-of-let-command\">39. What is the use of the let command in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>The <strong>let<\/strong> command is used for performing arithmetic operations on shell variables. It simplifies numeric calculations in scripts.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nlet result=5*3<br>\necho $result # Outputs 15<br>\n<\/div><\/div><h3 id=\"search-pattern-in-file\">40. How do you search for a pattern in a file using shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Use the <strong>grep<\/strong> command to search for a pattern in a file. It is commonly used for filtering text and finding specific strings in files.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ngrep &ldquo;pattern&rdquo; file.txt<br>\n<\/div><\/div><h3 id=\"copy-a-file\">41. How do you copy a file in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>The <strong>cp<\/strong> command is used to copy files from one location to another. You can specify options like <strong>-r<\/strong> to copy directories.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ncp source.txt destination.txt<br>\n<\/div><\/div><h3 id=\"purpose-of-find-command\">42. What is the purpose of the find command in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>The<strong> find<\/strong> command searches for files or directories within a specified path based on criteria like name, size, or modification time.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nfind \/path -name &ldquo;*.txt&rdquo;<br>\n<\/div><\/div><h3 id=\"compress-files-in-scripting\">43. How do you compress files in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>Use the <strong>tar<\/strong> command to compress files into a single archive. You can combine it with <strong>gzip<\/strong> to compress the archive further.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ntar -czvf archive.tar.gz \/path\/to\/files<br>\n<\/div><\/div><h3 id=\"difference-between-&gt;-and-&gt;&gt;\">44. What is the difference between &gt; and &gt;&gt; in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p><strong>&gt;<\/strong> overwrites the contents of a file, while <strong>&gt;&gt;<\/strong> appends to the file. This distinction is important when logging or saving output.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\necho &ldquo;New line&rdquo; &gt;&gt; file.txt<br>\n<\/div><\/div><h3 id=\"extract-a-substring\">45. How do you extract a substring in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>You can extract a substring using <strong>${string:position:length}<\/strong>. This is helpful when processing parts of a string.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nstr=&rdquo;HelloWorld&rdquo;<br>\necho ${str:0:5} # Outputs Hello<br>\n<\/div><\/div><h3 id=\"split-a-string\">46. How do you split a string in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Use <strong>IFS <\/strong>(Internal Field Separator) to split a string by a delimiter and store the parts in an array.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nIFS=&rdquo;,&rdquo; read -r -a array &lt;&lt;&lt; &ldquo;apple,banana,cherry&rdquo;<br>\necho ${array[1]} # Outputs banana<br>\n<\/div><\/div><h3 id=\"remove-a-file\">47. How do you remove a file in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>Use the <strong>rm<\/strong> command to remove files or directories. For directories, use the <strong>-r<\/strong> option to remove them recursively.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nrm file.txt<br>\n<\/div><\/div><h3 id=\"use-of-eval-command\">48. What is the use of eval in shell scripting?<\/h3><p><strong>Answer:<\/strong><\/p><p>The <strong>eval<\/strong> command executes a string as a command. It&rsquo;s useful for dynamically constructing and running commands based on variables or input.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\ncmd=&rdquo;ls -l&rdquo;<br>\neval $cmd<br>\n<\/div><\/div><h3 id=\"handle-multiple-commands\">49. How do you handle multiple commands in a single line in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p>You can use ; to run multiple commands in a single line. This allows you to sequence commands together, even if they are unrelated.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\necho &ldquo;Hello&rdquo;; echo &ldquo;World&rdquo;<br>\n<\/div><\/div><h3 id=\"difference-between-andand-and-||\">50. What is the difference between &amp;&amp; and || in shell scripting?<\/h3><p><strong>Answer: <\/strong><\/p><p><strong>&amp;&amp;<\/strong> executes the next command only if the previous command succeeds, while <strong>||<\/strong> executes the next command only if the previous command fails. These are used for conditional execution of commands.<br>\n<\/p><div class=\"su-note\" style=\"border-color:#e5dbc7;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF5E1;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">\nmkdir dir &amp;&amp; cd dir<br>\n<\/div><\/div><h2>Final Words<\/h2><p>Getting ready for an interview can feel overwhelming, but going through these Shell Scripting fresher interview questions can help you feel more confident.<\/p><p>With the right preparation, you&rsquo;ll ace your Shell Scripting interview but don&rsquo;t forget to practice shell commands, file manipulation, process management, and scripting-related interview questions too.<\/p><hr><h2>Frequently Asked Questions<\/h2><h3>1. What are the most common interview questions for Shell scripting?<\/h3><p>Common Shell scripting interview questions include file handling commands, loops, conditionals, process control (e.g., ps, kill), scripting with awk and sed, variable usage, writing functions, and understanding the difference between various shells like bash, sh, and zsh.<\/p><h3>2. What are the important Shell scripting topics freshers should focus on for interviews?<\/h3><p>Freshers should focus on basic commands, control flow (loops, conditionals), working with files (reading, writing, appending), string manipulation, process control, regular expressions, text processing utilities like awk, sed, and basic automation scripts.<\/p><h3>3. How should freshers prepare for Shell scripting technical interviews?<\/h3><p>Freshers should practice writing small scripts that automate common tasks, such as file handling, system monitoring, and backups. Understanding how to use basic Shell utilities and writing clean, efficient scripts with proper comments will be beneficial.<\/p><h3>4. What strategies can freshers use to solve Shell scripting coding questions during interviews?<\/h3><p>Freshers should carefully analyze the problem, use the correct commands for the task, and break down the solution into manageable steps. Testing the script incrementally and handling edge cases, such as empty files or incorrect input, is key.<\/p><h3>5. Should freshers prepare for advanced Shell scripting topics in interviews?<\/h3><p>Yes, freshers should prepare advanced topics like process management, signal handling, background processes, and performance tuning can be explored once they have a solid grasp of the fundamentals.<\/p><hr><h2 id=\"explore-more-resources\">Explore More Shell Scripting Resources<\/h2><ul class=\"explore-more\">\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/shell-scripting-project-ideas-for-beginners\/\">Shell Scripting Project Ideas<\/a><\/li>\n<\/ul><h2>Explore More Interview Questions<\/h2><ul class=\"explore-more\">\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/python-interview-questions-for-freshers\/\">Python<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/java-interview-questions-for-freshers\/\">Java<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/sql-interview-questions-for-freshers\/\">SQL<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/react-interview-questions-for-freshers\/\">React<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/javascript-interview-questions-for-freshers\/\">JavaScript<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/c-programming-interview-questions-for-freshers\/\">C Programming<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/html-interview-questions-for-freshers\/\">HTML<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/css-interview-questions-for-freshers\/\">CSS<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/angular-interview-questions-for-freshers\/\">Angular<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/cpp-interview-questions-for-freshers\/\">C++<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/spring-boot-interview-questions-for-freshers\/\">Spring Boot<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/node-js-interview-questions-for-freshers\/\">Node JS<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/excel-interview-questions-for-freshers\/\">Excel<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/c-sharp-interview-questions-for-freshers\/\">C#<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/dbms-interview-questions-for-freshers\/\">DBMS<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/php-interview-questions-for-freshers\/\">PHP<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/linux-interview-questions-for-freshers\/\">Linux<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/operating-system-interview-questions-for-freshers\/\">Operating System<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/mysql-interview-questions-for-freshers\/\">MySQL<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/spring-interview-questions-for-freshers\/\">Spring<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/flutter-interview-questions-for-freshers\/\">Flutter<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/mongodb-interview-questions-for-freshers\/\">MongoDB<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/django-interview-questions-for-freshers\/\">Django<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/react-native-interview-questions-for-freshers\/\">React Native<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/jquery-interview-questions-for-freshers\/\">jQuery<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/bootstrap-interview-questions-for-freshers\/\">Bootstrap<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/embedded-c-interview-questions-for-freshers\/\">Embedded C<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/dsa-interview-questions-for-freshers\/\">DSA<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/r-programming-interview-questions-for-freshers\/\">R Programming<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/hadoop-interview-questions-for-freshers\/\">Hadoop<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/dot-net-interview-questions-for-freshers\/\">.NET<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/power-bi-interview-questions-for-freshers\/\">Power BI<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/asp-net-interview-questions-for-freshers\/\">ASP.NET<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/asp-net-mvc-interview-questions-for-freshers\/\">ASP.NET MVC<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/android-interview-questions-for-freshers\/\">Android<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/tableau-interview-questions-for-freshers\/\">Tableau<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/mvc-interview-questions-for-freshers\/\">MVC<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/wordpress-interview-questions-for-freshers\/\">WordPress<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/typescript-interview-questions-for-freshers\/\">TypeScript<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/spark-interview-questions-for-freshers\/\">Spark<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/kotlin-interview-questions-for-freshers\/\">Kotlin<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/swift-interview-questions-for-freshers\/\">Swift<\/a><\/li>\n<li><a href=\"https:\/\/www.placementpreparation.io\/blog\/golang-interview-questions-for-freshers\/\">Golang<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Are you preparing for your first Shell Scripting interview and wondering what questions you might face?Understanding the key Shell Scripting interview questions for freshers can give you more clarity.With this guide, you&rsquo;ll be well-prepared to tackle these Shell Scripting interview questions and answers for freshers and make a strong impression in your interview.Practice Shell Scripting [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":12864,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[],"class_list":["post-12996","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-interview-questions"],"_links":{"self":[{"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/posts\/12996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/comments?post=12996"}],"version-history":[{"count":14,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/posts\/12996\/revisions"}],"predecessor-version":[{"id":14862,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/posts\/12996\/revisions\/14862"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/media\/12864"}],"wp:attachment":[{"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/media?parent=12996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/categories?post=12996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.placementpreparation.io\/blog\/wp-json\/wp\/v2\/tags?post=12996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}