bash-linux

Write robust Bash/Linux commands and scripts for automation and log analysis.

Updated Dec 10, 2024
One-click install
npx skills add https://github.com/melikhanmutlu/web_ar --skill bash-linux-melikhanmutlu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash-linux
Source: https://github.com/melikhanmutlu/web_ar/tree/main/skills/bash-linux
Command: npx skills add https://github.com/melikhanmutlu/web_ar --skill bash-linux-melikhanmutlu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

Core Features & Use Cases

  • Chaining commands with ;, &&, ||, and pipes
  • File operations: ls, find, cat, head, tail, du
  • Process management: ps, kill, lsof
  • Text processing: grep, sed, awk, cut, sort, uniq, wc
  • Environment variables and PATH management
  • Script templates and safety checks (set -e, set -u, pipefail)

Quick Start

Try running a few sample commands in your terminal to observe chaining, piping, and basic file operations.

Frequently Asked Questions about bash-linux

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I chain bash commands with pipes and conditionals in a Linux terminal?

Chain bash commands using semicolons for sequential execution, and use && or || to conditionally run the next command based on the previous one's success or failure. Pipes pass standard output between commands for text processing.

What is the best way to process text files using grep, sed, and awk?

The best way to process text files is by combining standard Linux tools. Use grep for pattern matching, sed for stream editing, and awk for column extraction and complex text processing within a single pipeline.

How do I write a robust bash script with error handling and safety checks?

Write a robust bash script by including safety checks like set -e to exit on errors, set -u to treat unset variables as errors, and pipefail to catch failures within pipes. These commands ensure your script fails safely.

Can I manage processes and file operations on macOS using Linux terminal commands?

Yes, you can manage processes and file operations on macOS using standard Linux terminal commands. Tools like ls, find, du for files, and ps, kill, lsof for process management are fully applicable on macOS.

How do I manage environment variables and the PATH in a bash script?

Manage environment variables and the PATH in bash by assigning variables directly in the script and exporting them. Modify the PATH variable by appending or prepending directory paths to ensure the system locates required executables.