Articles by Deepak Prasad
Agentic Software Factory Platforms: Architecture & Technical Comparison
Technical comparison of nine agentic software factory platforms by architecture — context, work intake, orchestration, governance, and measurement — not a ranked vendor list.
Bash Subshells: () vs {}, Variable Scope and Examples
Learn how Bash subshells work, when ( ) isolates variables and cd, how { } differs, and why pipelines and command substitution can lose shell state.
Bash Process Substitution: <() and >()
Bash process substitution with <() and >(): expose command output as a file path, compare pipes and $(), keep while read in the current shell, and handle async exit status.
Bash File Descriptors and exec
Open Bash file descriptors beyond 0/1/2 with exec, write with >&3, read with read -u, save and restore stdout, use dynamic {fd} allocation, and close FDs to avoid leaks.
Bash Heredoc: <<EOF, Variables, Indentation and Here Strings
Learn Bash heredoc and here-string syntax: quoted delimiters, <<- tab stripping, variable assignment, sudo tee, SSH expansion, and tested <
Bash Redirection: stdin, stdout and stderr
Bash redirection explained with file descriptors 0, 1, and 2, left-to-right 2>&1 semantics, split logs, append, exec, and why sudo does not fix a failed shell redirect.
Bash Pipes: pipefail, PIPESTATUS and Exit Codes
Learn Bash pipes: connect stdout between commands, use pipefail and PIPESTATUS for pipeline exit codes, pipe stderr with |&, and avoid subshell and SIGPIPE surprises.
Bash Parameter Expansion: ${var:-}, Substrings, Trim & Replace
Bash parameter expansion explained with ${var:-default}, substring slicing, trim, replace, and a truth table for default, assignment, alternate, and error operators covering unset vs empty variables.
Bash Expansion Order: How Shell Expansion Works
Learn Bash expansion order from brace and variable expansion to word splitting, globbing, and quote removal, with tested examples.
Bash Command Substitution: Syntax, Examples and $() vs Backticks
Learn Bash command substitution with $(): capture command output in variables, compare backticks, handle quoting and newlines, and understand subshell behavior.
Split a String into an Array in Bash
Split one Bash string into array elements with IFS and read -ra, handle comma colon and pipe delimiters, preserve spaces, avoid unsafe arr=($string) globbing, and know when IFS is not a CSV parser.
Bash IFS and Word Splitting Explained
Learn how Bash IFS controls word splitting on unquoted expansions, how whitespace delimiters differ from commas and colons, and safe patterns with read, local IFS, and "$@".
Bash mapfile / readarray: Read Lines into an Array
Load files and command output into Bash indexed arrays with mapfile and readarray: -t for clean lines, -n and -s for limits, -O for a starting index, -d for custom delimiters, and NUL-safe find -print0 paths.
Bash Associative Arrays: Key-Value Maps
Create Bash associative arrays with declare -A, store string keys and values, loop keys safely, count occurrences, use maps as sets, and avoid common quoting and ordering mistakes.
Bash Arrays: Create, Append, Loop, Slice and Delete
Learn Bash indexed arrays: create, access, append, loop, slice, and delete elements safely with "${array[@]}", sparse indices, negative indexes, and command argument arrays.
Bash getopts: Parse Short Options and Handle Long Options
Learn Bash getopts for short flags, OPTARG and OPTIND, silent error mode, shift after parsing, reusable functions, manual long options, and when to use GNU getopt instead.
Bash source Command: Source vs Execute a Script
Learn when to use Bash source or dot versus bash file or ./file, what changes persist in the current shell, how sourced arguments and return status work, PATH lookup with sourcepath, and Bash 5.3 source -p path.
Bash Functions: Arguments, Variables and Return Values
Define Bash functions with arguments, local variables, return status, stdout capture, and nameref output parameters, including dynamic scope and subshell behavior.
Create Interactive Menus with Bash select
Build numbered terminal menus in Bash with select, customize the PS3 prompt, read choices from REPLY, validate invalid input, use arrays and function arguments, and add a quit option with break.
OT/ICS Security Testing: Modbus, PLCs and Industrial Networks
Learn OT/ICS security testing with a different risk model from IT pentests: ICS architecture, Modbus TCP vs Modbus Security, local Modbus and virtual CAN labs on Kali, plus safety and controls.
LLM Prompt Injection Attacks: Direct, Indirect, RAG, and Agent Risks
Test LLM prompt injection as application security: direct and indirect attacks, malicious instructions in retrieved RAG content, agent tool abuse, system-prompt leakage, and a deterministic app-security simulator mapped …
Scapy Tutorial: Craft, Send, Sniff, and Analyze Network Packets
Learn Scapy packet crafting in Python: build IP/TCP/UDP/ICMP layers, inspect with show() and show2(), send and receive on localhost, sniff loopback traffic, and read or write PCAP files.
Bash break and continue
Use Bash break and continue to exit loops early or skip an iteration, including nested levels, while read parsing, and select menus.
Read a File Line by Line in Bash
Read a text file line by line in Bash with while IFS= read -r, preserve whitespace and backslashes, handle files without a final newline, and avoid pipeline subshell traps.
Bash while Loop
Use Bash while loops with command exit status, arithmetic counters, infinite loops, retries, brief read loops, the pipeline subshell trap, until, and do-while emulation.
Bash Wildcards and Globbing
Learn Bash globbing and wildcards with tested examples for *, ?, bracket patterns, nullglob, dotglob, nocaseglob, globstar, extglob, quoting, arrays, and safe loops over matched files.
Bash for Loop: Syntax and Examples
Learn Bash for loop syntax with practical examples for lists, arrays, files, script arguments, numeric ranges, and C-style counters.
Bash Regex: =~ and BASH_REMATCH
Match text in Bash with [[ =~ ]], capture groups in BASH_REMATCH, store regex in variables, avoid RHS quoting traps, and understand POSIX ERE limits versus PCRE.
Compare Numbers in Bash
Compare integers in Bash with -eq, -gt, [ ], [[ ]], and (( )); handle leading zeros, negative values, untrusted input, and decimal checks with bc or awk.
Check If File or Directory Exists in Bash
Check whether a file or directory exists in Bash with -e, -f, and -d, including missing paths, symlinks, permissions, and practical shell script examples.

