Shell

1 program Added 2026-03-17T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: sh, POSIX shell, Unix shell, Bourne shell
Provenance: commit 92bf566b20 · authored 2026-03-17T07:11:14+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

6 sources · pl_id: pl/shell
LLM (this repo) · 1LinguistPygmentsWikipediaHyperpolyglotWikidata · Q204222

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Designed byMartijn Dekker · Johnothan King · hyenias · Kurtis Rader · Siteshwar Vashisht · community
First appeared1983
LicenseEclipse Public License
Homepagehttp://github.com/ksh93/ksh/wiki

Extensions claimed by this language

26 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.shlinguistprimary50.4M files
.shpygmentsprimary50.4M files
.bashlinguistsecondary1.2M files
.bashpygmentssecondary1.2M files
.bashrcpygmentssecondary32.8K files
.batslinguistsecondary179.6K files
.cgilinguistsecondary461.7K files
.commandlinguistsecondary67.8K files
.ebuildpygmentssecondary7.6M files
.eclasspygmentssecondary79.3K files
.exheres-0pygmentssecondary
.exlibpygmentssecondary48.0K files
.fcgilinguistsecondary11.6K files
.kshlinguistsecondary96.5K files
.kshpygmentssecondary96.5K files
.kshrcpygmentssecondary296 files
.pkgbuildpygmentssecondary4.7K files
.sbatchlinguistsecondary120.6K files
.slurmlinguistsecondary224.5K files
.tmuxlinguistsecondary15.1K files
.toollinguistsecondary8.5K files
.triggerlinguistsecondary123.7K files
.zshlinguistsecondary785.3K files
.zshpygmentssecondary785.3K files
.zsh-themelinguistsecondary
.zshrcpygmentssecondary20.6K files

Related languages

Bourne Shell (0.45)Scsh (0.24)Lush (0.22)Zsh (0.21)csh (0.20)

LLM-contributed programs

Fibonacci sequence

Provenance: commit 92bf566b20 · authored 2026-03-17T07:11:14+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.sh · license: Public Domain · added: 2026-03-17T10:00:00Z
#!/bin/sh
# Fibonacci sequence - iterative implementation

fibonacci() {
    n=$1
    if [ "$n" -le 0 ]; then
        echo 0
        return
    fi
    a=0
    b=1
    i=1
    while [ "$i" -lt "$n" ]; do
        c=$((a + b))
        a=$b
        b=$c
        i=$((i + 1))
    done
    echo $b
}

echo "Fibonacci sequence (first 10 terms):"
i=0
while [ "$i" -lt 10 ]; do
    result=$(fibonacci $i)
    printf "F(%d) = %d\n" "$i" "$result"
    i=$((i + 1))
done

Real programs from Software Heritage

2 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
set_ia32_sysroot.sh · 987 B · ext .sh · seen 13179× in SWH
via fallback
swh:1:cnt:194433040640d167e6aa4de66cedc6c8ebe03f2e;origin=https://github.com/dart-lang/sdk;anchor=swh:1:rev:523353d28017fced825581ea327509c620eed67e;path=/tools/set_ia32_sysroot.sh
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
#!/usr/bin/env bash
#
# Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

# Sets the compiler environment variables to use a downloaded Debian sysroot
# when building Dart with architecture ia32.
# Run this in the same working directory that you have run
# sdk/tools/download_chromium_sysroot.sh in.
# Must be sourced, not run in a subshell, to modify the environment.
# Run with the command ". sdk/tools/set_ia32_sysroot.sh"
# Only tested and used on Ubuntu trusty linux. Used to build dart with
# no requirement for glibc greater than version 2.14.

export CXXFLAGS="--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu"

export LDFLAGS=--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot
export CFLAGS=--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot
start-falcon.slurm · 4917 B · ext .slurm · seen 26× in SWH
via fallback
swh:1:cnt:c3ac6761225829fd88803a744e9990e396d8b7f7;origin=https://github.com/ebsmartin/DDDQN_RL_AI_Insider_Trading_Exploitation_Trading_Bot;anchor=swh:1:rev:94f5833819e887fce6b704c965c0d5b8666c70cf;path=/DDDQ_RL_Trading_Bot/Code/start-falcon.slurm
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
#!/bin/bash

# A Slurm batch file is, in short, a Bash script with some special comments that start with "#SBATCH".
# These special comments are used to specify command-line options for Slurm's "sbatch" command.
# For more info on what options are available and what they do, see the link below.
# https://slurm.schedmd.com/sbatch.html
# For more info on how to use these specifically for the Falcon HPC cluster, see the link below.
# https://sna.cs.colostate.edu/hpc/

# In general, Slurm will select which job to run next based on the following (in no particular order):
# 1. What resources are currently available
# 2. How many resources you requested
# 3. How long you want to use those resources for
# 4. How many jobs you've submitted recently
# 5. How many system resources you've used recently.
# Because of this, it's best to ask only for what you need.
# This will make it so your job is scheduled more quickly, prevent scheduling delays in the future,
# and it lets others use the cluster as well.

#######################################################################################################################
# Give your job a name so you can find it easier in the queue.
# Also indicate the name of the output file you'd like.
# If you don't specify an output file, Slurm will create one that looks like "slurm-1234.out",
# replacing "1234" with the job number.

#SBATCH --job-name="Ebmartin_Test"
#SBATCH --output=ebmartin_trading_test_output.out
#SBATCH --error=ebmartin-job.err 

#######################################################################################################################
# On the Falcon cluster, the partition selects what kind of nodes you want to use,
# and the QOS (quality of service) indicates how long you want to use it for.
# The "time" option lets us indicate the maximum time that our script will take (must be shorter than the QOS time).
# This is in "wall clock" time. I.e., if you ask for 5 minutes and have 5 tasks, the 5 minutes are NOT divided
# into 1 minute per task (which is different when compared to other resource requests, like using --mem for memory).

#SBATCH --partition=peregrine-gpu
#SBATCH --qos=gpu_short


#######################################################################################################################
# These specify how many resources we want to use.
# The descriptions here are how we will interpret them for now,
# but it's worth noting that they have other interpretations as well,
# and there are a variety of different ways to specify what you want.
# Some clusters may have limits on how many resources you can request at a time.
# For the Falcon resource limits, see the link below.
# https://sna.cs.colostate.edu/hpc/job-handling/limits/

# Nodes: the number of individual computers to use.
# GRES: "generic resources" to allocate per node. This requests two NVIDIA A100 40GB GPUs per node.
# GPU Bind: if and how to map GPUs to tasks. NCCL (communication library used by PyTorch) fails if you bind GPUs.
# Tasks Per GPU: the number of processes Slurm will start up per GPU.
# CPUs Per Task: the number of CPU cores used per task. This does not distinguish between threads and processes.
# Mem Per CPU: the amount of memory to allocate per CPU core (again, either threads or processes).

#SBATCH --nodes=1
#SBATCH --gres=gpu:nvidia_a100_3g.39gb:2
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=200GB

#######################################################################################################################
# After specifying the options for the sbatch command, we tell Slurm what to do.
# Since we're using PyTorch, we need to use the module system to load the Anaconda instance.
# The final "srun" command indicates what task we want to be distributed.
# You can add some options to that as well to get a highly customized Slurm job, but we don't need that here.
# For information on what options are available, see the link below.
# https://slurm.schedmd.com/srun.html

# An important thing to note (in general, although not for this specific script):
# "srun" is able to detect if the program you're running supports MPI.
# If it does, then "srun" will work very similarly to "mpirun" or "mpiexec".

# For future scripts you may write, you are allowed to have multiple "srun" commands.
# These are called "job steps", and are used to have one job run multiple programs
# without needing to go through the scheduler twice.

# Final note: using "srun" is not strictly necessary, but it's highly recommended.
# See the links below for more information on why srun is useful and how it differs from sbatch.
# https://stackoverflow.com/questions/64327432/slurm-why-do-we-need-srun-in-sbatch-script-file
# https://stackoverflow.com/questions/43767866/slurm-srun-vs-sbatch-and-their-parameters

module purge
module load python/anaconda

srun python TradingSystem.py

Contribute — propose a file extension

Tell us where to find evidence about Shell (mapped to pl/shell). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Shell/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← SheerPower 4GL ShellCheck Config →