license:mit size_categories:n<1K format:csv modality:text library:datasets library:pandas library:mlcroissant library:polars region:us infinite-dataset-hub synthetic
---
license: mit
tags:
- infinite-dataset-hub
- synthetic
---

# ShellScriptDataset

tags: Automation Scripts, Anomaly Detection, Error Classification

_Note: This is an AI-generated dataset so its content may be inaccurate or false_

**Dataset Description:** The 'ShellScriptDataset' contains a variety of shell scripts annotated with labels indicating their purpose and whether they exhibit anomalous behavior or contain errors. Each row includes the script's content, its label(s), and metadata such as script name and author. The dataset aims to aid in training machine learning models for automation script analysis, anomaly detection, and error classification.

**CSV Content Preview:**

```
script_id,script_name,author,script_content,label
1,"deploy_server.sh","JohnDoe","#!/bin/bash
echo 'Deploying server with updated application'
apt-get update && apt-get install -y nginx
echo 'Server deployment complete.'","automation"
2,"backup_db.sh","JaneSmith","#!/bin/bash
echo 'Starting database backup process'
tar -czf backup.tar.gz /var/lib/mysql
echo 'Backup complete.'","automation"
3,"log_error.sh","JimBeam","#!/bin/bash
if [ $? -ne 0 ]; then
  echo 'Error encountered. Check log.'
  exit 1
fi
echo 'Logging successful.'","error"
4,"infinite_loop.sh","JohnDoe","#!/bin/bash
while true; do
  echo 'This is an infinite loop.'
done","anomaly"
5,"secure_login.sh","SarahConnor","#!/bin/bash
echo 'Starting secure login process'
echo 'Username: root' | sudo -S passwd -ld root
echo 'Root password has been secured.'","automation"
```

This CSV snippet shows a small portion of the dataset. Each script is annotated with one or more labels indicating its primary purpose and any notable characteristics. Scripts labeled as "automation" are typically used to automate routine tasks. Scripts labeled as "error" might contain potential issues or might be intentionally problematic for the purpose of training error detection models. Scripts labeled as "anomaly" may represent non-standard usage patterns or behaviors that deviate from normal operations.

**Source of the data:**

The dataset was generated using the [Infinite Dataset Hub](https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub) and microsoft/Phi-3-mini-4k-instruct using the query 'shell script':

- **Dataset Generation Page**: https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub?q=shell+script&dataset=ShellScriptDataset&tags=Automation+Scripts,+Anomaly+Detection,+Error+Classification
- **Model**: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct
- **More Datasets**: https://huggingface.co/datasets?other=infinite-dataset-hub
