π Day 5 of My DevSecOps Journey

CURL vs WGET, Process Priority, nohup, /proc, AWK, GREP & SED (Beginner-Friendly Guide)
Today was packed with extremely practical Linux concepts used daily in API testing, automation, monitoring, and log analysis.
Hereβs a detailed breakdown of everything I learned, explained simply with clear examples and visuals π
π 1οΈβ£ CURL vs WGETβ Understanding the Difference
Today I learned the real purpose of these two powerful commands:
π¦ wget
Download files from the internet
Simple and reliable
Great for grabbing large binaries, tar files, etc.
π§ curl
Can download AND upload
Supports POST/PUT requests
Supports FTP/SFTP
Highly used in API testing
π Handling Redirect URLs
When using shortened links like bit.ly, they redirect to another site.
curl:
curl -L <url>wget:
wget --max-redirect=10 <url>
π‘ API Testing with cURL
curl -X POST <url>
This allows interacting with APIs directly from Linux β extremely useful for DevOps/DevSecOps pipelines.
βοΈ 2οΈβ£ Process Priority, nohup & The /proc Directory
π Setting Process Priority
I learned how to control how much CPU a process should get:
nice -n 10 ./longjob.sh
Higher numbers = lower priority.
π nohup β Keep Processes Running Even After Logout
nohup ./script.sh &
Makes the process immune to disconnections
Perfect for long-running background tasks
π Understanding /proc Directory
/proccontains virtual files representing system and process information.Shows live data: memory, CPU usage, process status, etc.
Great for debugging & monitoring performance.
π 3οΈβ£ Text Processing Tools β AWK, GREP & SED
These three tools are the backbone of log analysis and data filtering in Linux.
π‘ AWK β The Text Processing Powerhouse
AWK works with columns and delimiters.
Example text:
Max Rodriguez
Maxβ Column 1 ($1)Rodriguezβ Column 2 ($2)
π Common AWK Commands
print $0β entire lineprint $1β first wordprint $2β second word
π General Format
awk 'pattern { action }' file.txt
π§ͺ Example
Print rows where the 4th column is greater than 5000:
awk '$4 > 5000 {print $1, $4}' 1.txt
π΅ GREP β Searching & Filtering Text
Grep helps find specific patterns in huge logs or datasets.
π Common Flags
-iβ ignore case-vβ inverse match-nβ show line numbers-cβ count matches-Eβ extended regex-rβ recursive search-wβ exact word
π Useful Patterns
^Aβ lines starting with βAβNew York$β lines ending with βNew Yorkβ
Perfect for filtering logs, API responses, and system messages.
π΄ SED β Stream Editor for Editing Text
SED helps modify files without opening them.
π Common Commands
1οΈβ£ Suppress output
sed -n
2οΈβ£ Print the 3rd line
sed -n '3p' 1.txt
3οΈβ£ Print lines 2 to 4
sed -n '2,4p' 1.txt
4οΈβ£ Append after a line
sed '3a\This is a new line' 1.txt
5οΈβ£ Insert before a line
sed '1i\This is a new line' 1.txt
SED becomes extremely useful during automation, CI/CD scripts, and configuration changes.
π― Day 5 Takeaway
Today strengthened my understanding of:
βοΈ API testing using cURL
βοΈ Priority management using nice
βοΈ Persistent background processing with nohup
βοΈ Understanding Linux internals via /proc
βοΈ Text processing (AWK, GREP, SED) β crucial for handling logs and automation
Each day, the Linux foundation becomes clearer β helping me build the strong fundamentals needed for DevSecOps.
See you on Day 6! π




