spent some time learning bash scripting today started with basics what is shebang and why it’s used. understood what shell actually is and bash, zsh, ksh are just different shells. then tried basic things like - taking input, printing output variables if else, loops also learned how to run scripts directly with ‘./‘ and using interpreters like ‘sh’. tested some scripts by passing arguments into them. looked at some built-in variables like $HOME, $USER, $SHELL executed the scripts in debugging mode and checked what happens when a script fails. pipes failing was something new for me cause the scripts checks the output of a last piped command, in between any failure happens then the script does not stop executing. #devops #linux
Learning Bash Scripting Basics and Shell Fundamentals
More Relevant Posts
-
Day 21 of #90DaysOfDevOps - Built My Own Shell Scripting Cheat Sheet! Today I created my own Shell Scripting Cheat Sheet 📘 🔧 What I did: Covered basics, loops, functions, and conditions Added commands like grep, awk, sed Included useful real-world one-liners 📚 What I learned: Writing notes improves understanding Shell scripting is powerful for automation One-liners can save a lot of time Checkout my work: https://lnkd.in/gPN_j_F6 #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham #ShellScripting #Linux #DevOps #Automation #Bash #Scripting #LearnInPublic #CloudComputing #SysAdmin #DeveloperJourney #TechLearning #Programming
To view or add a comment, sign in
-
NASM Hello World Gists on Github Github has a feature called Gists which allow people to share short programs more conveniently than having an entire repository for them. Although of course these are part of my Chastity’s Code Cookbook repository, I like having these conveniently linked so that people who want a taste of Assembly programming can use my example code to get started with NASM. NASM 32-bit ELF Hello World with no linker https://lnkd.in/gr2UBwfi NASM 64-bit ELF Hello World with no linker https://lnkd.in/gCWDcHdn Obviously FASM can generate the ELF header without my math but I had to learn how the format works to get these working and also so I don’t depend on only one assembler. In my next book, I plan to cover using either FASM or NASM for Assembly language programming in Linux.
To view or add a comment, sign in
-
🐧 This wasn’t what I thought it would be. I used to think working with Linux meant knowing commands. But this changed that for me. Somewhere between writing shell scripts, handling variables, and understanding how processes actually run, it stopped feeling like “typing commands”… and started feeling like building systems. What stood out most wasn’t even the tools , it was the structure behind them. Things like: • how simple commands can be chained into something powerful • why automation isn’t just convenience, it’s discipline • and how the shell is quietly a full programming environment It made me realize something uncomfortable, a lot of us use tools daily without ever really understanding how they think. Still learning, still breaking things, still fixing them. But now, at least, I know what’s happening under the surface. Add your take. Credit: Firdevs Balaban #Linux #DevOps #SoftwareEngineering #ShellScripting #OpenSource #BackendDevelopment #TechLearning #Programming #Developers #LPIC
To view or add a comment, sign in
-
This week I’ve been diving back into The Linux Command Line by William Shotts, picking up where I left off after my Arch installation project and working through the Bash scripting section. So far, I’ve been learning about: - shell functions and if statements - conditional evaluation in Bash using test, [[ ]], and arithmetic evaluation with (( )) - here documents and here strings - looping constructs like while and until - controlling loops with the break and continue builtins - the select construct for building simple menus - positional parameters and passing arguments to shell scripts and shell functions It’s been a good reminder that Bash has a lot more depth than just running commands interactively. I’ve especially enjoyed learning how these scripting features fit together to make shell scripts more dynamic, reusable, and easier to control.
To view or add a comment, sign in
-
Most bugs don’t come from “complex logic.” They come from things we thought were simple. Lately while working in C on Linux, I’ve been noticing how easy it is to overlook small details: forgetting how memory is actually laid out assuming a pointer is valid without verifying not checking return values properly treating undefined behavior like it “probably works” What surprised me is this: the deeper I go into low-level programming, the less I trust assumptions. Now I try to think in terms of: What is actually happening in memory? What is the system really doing here? What can break silently? It slows things down a bit, but the code becomes more predictable and debugging gets easier. Still early in this journey, but learning to think this way feels like a shift from “writing code” to actually understanding systems.
To view or add a comment, sign in
-
-
Me before today: "Yeah, I know what ThreadPool is... theoretically." Me after today: Actually implements background workers, fixes race conditions with locks, and makes code run 3x faster. The "Aha!" moment: running multiple tasks simultaneously vs. one by one and watching the execution time drop from 6 seconds to 2 seconds. Level 3 task with Codveda done! #CodvedaAchievements! Finally put those OS theory concepts (Linux daemons, who? 😂) into real C# code. Biggest wins: Async/await = non-blocking magic ThreadPool = reusing workers like a boss lock = stopping threads from fighting over data Simulated daemons in Windows (feeling powerful) Theory → Practice = Growth 📈 Anyone else remember their first "aha" moment with async programming? #Codveda #CodvedaProjects #CSharp #NeverStopLearning #threading
To view or add a comment, sign in
-
RAM hogs are hiding in plain sight. Find them in one command. 🔥 The Command `ps aux --sort=-%mem | head -n 6` What it does: `ps aux` lists every running process. `--sort=-%mem` orders by memory usage, biggest first. `head -n 6` shows the top six lines (top hogs). #linux #terminal #bash #commandline #devops #sysadmin #programming #softwareengineering #developer #productivity #opensource #automation #buildinpublic #learntocode
To view or add a comment, sign in
-
-
Writing Files in Bash✍️ Reading files is useful🧐 But writing them is where things get interesting. In Bash, you don’t “open and save” files. You redirect output into them. echo "hello world" > output.txt That single > means: overwrite the file If you want to keep existing data: echo "new line" >> output.txt That’s the append operator. This is one of those small concepts that quietly powers everything: • logs • automation scripts • system reports Once you get used to this, text files become your database. #Bash #Linux #Terminal #DevOps #Programming CoderCo
To view or add a comment, sign in
-
One important realization while working with multithreading in C++: std::thread vs pthread is not about which creates threads — both ultimately rely on the OS. It’s about how you interact with them. At a glance: C++ → std::thread → pthread → OS threads So what actually changes? With pthread: • Low-level C API • Manual handling (void*, return codes) • More control, more room for mistakes With std::thread: • Modern C++ abstraction • RAII-based safety • Strong typing • Exception handling • Cleaner, more readable code The key shift: You’re not switching away from system threads you’re switching to a safer and more expressive interface to use them. That’s why modern C++ feels powerful: It doesn’t remove control it wraps it intelligently. Rule of thumb: Use pthread when you need fine-grained system-level control Use std::thread for almost everything else Curious: Did you start your journey with low-level pthread, or jump straight into modern C++ threading? #cpp #cplusplus #multithreading #concurrency #linux #softwareengineering #programming
To view or add a comment, sign in
-
-
Working with files in Bash comes down to 3 essential skills: 📖 Reading Files Use a while loop to process a file line-by-line (best for scripts), or cat for quick viewing or piping into other commands. ✍️ Writing Files - > → creates or overwrites a file - >> → appends to an existing file without deleting content 🔐 Checksums (File Integrity) Commands like md5sum or sha256sum generate a unique “fingerprint” of a file. If two files have the same checksum → they’re identical. If not → something changed. 👉 Why this matters: These basics power automation, data processing, and security checks in real-world scripts. #Bash #Linux #DevOps #Programming #Automatio
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development