{"id":33605,"date":"2022-05-01T14:32:37","date_gmt":"2022-05-01T14:32:37","guid":{"rendered":"https:\/\/www.arimetrics.com\/glosario-digital\/script"},"modified":"2026-09-26T23:13:44","modified_gmt":"2026-09-26T23:13:44","slug":"script","status":"publish","type":"encyclopedia","link":"https:\/\/www.arimetrics.com\/en\/digital-glossary\/script","title":{"rendered":"Script"},"content":{"rendered":"<p><img decoding=\"async\" class=\"boxpad alignright wp-image-80647 size-full\" src=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2026\/09\/script-glosario-600.jpg\" alt=\"Script for automation and programming\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.arimetrics.com\/wp-content\/uploads\/2026\/09\/script-glosario-600.jpg 600w, https:\/\/www.arimetrics.com\/wp-content\/uploads\/2026\/09\/script-glosario-600-300x300.jpg 300w, https:\/\/www.arimetrics.com\/wp-content\/uploads\/2026\/09\/script-glosario-600-150x150.jpg 150w, https:\/\/www.arimetrics.com\/wp-content\/uploads\/2026\/09\/script-glosario-600-360x360.jpg 360w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><strong>Definition:<\/strong><\/p>\n<p>A <strong>script<\/strong> is a set of instructions written in a programming language to perform a specific task within a system, application or web page. It can automate processes, transform data, coordinate tools or add behaviour to another program.<\/p>\n<p>The term is commonly associated with relatively small files executed by an interpreter, engine or host environment. However, <strong>there is no universal technical boundary<\/strong> that determines when a script becomes a complete program.<\/p>\n<h2>How a script works<\/h2>\n<p>To run, the code needs an environment that understands its language. That environment may interpret the instructions, compile them at runtime or transform them before execution. The mechanism depends on the language, its implementation and the platform.<\/p>\n<p>A script can receive input, apply conditions and operations, call other functions and produce a result. It may also read files, use an <a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/api\">API<\/a>, query a database or modify interface elements, provided that the necessary permissions are available.<\/p>\n<p>Scripts are not limited to browsers. They can run on a server, in a terminal, within an operating system, in a desktop application or through an engine embedded in another product. Their <strong>location and capabilities depend on the execution environment<\/strong>.<\/p>\n<h2>What scripts are used for<\/h2>\n<p>Their common purpose is to express a reproducible sequence of actions. Typical uses include the following:<\/p>\n<ul>\n<li><strong>Automation:<\/strong> Running backups, renaming files, generating reports or performing scheduled tasks.<\/li>\n<li><strong>Web interaction:<\/strong> Validating forms, updating interfaces and responding to user events.<\/li>\n<li><strong>Data processing:<\/strong> Cleaning, converting, combining or analysing information from different sources.<\/li>\n<li><strong>System administration:<\/strong> Configuring machines, checking services, deploying software and managing users.<\/li>\n<li><strong>Integration:<\/strong> Connecting applications, sending requests to external services and coordinating workflows.<\/li>\n<li><strong>Testing:<\/strong> Repeating checks and verifying how an application behaves.<\/li>\n<\/ul>\n<p>A script can save time and reduce mistakes in repetitive work, but incorrect automation can also repeat the same error at scale. The result should therefore be <strong>validated and logged<\/strong> when the process affects important data or systems.<\/p>\n<h2>Languages used for scripting<\/h2>\n<p>The expression &#8220;scripting language&#8221; describes a common use rather than a rigid category. Many languages can support both short scripts and extensive applications. The choice depends on the environment, available libraries and the task to be solved.<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/javascript\">JavaScript:<\/a><\/strong> Runs in browsers as well as servers and other platforms.<\/li>\n<li><strong>Python:<\/strong> Used for automation, data analysis, web development, testing and internal tools.<\/li>\n<li><strong>PHP:<\/strong> Mainly used to generate content and execute logic on web servers.<\/li>\n<li><strong>Ruby:<\/strong> Used in automation, web development and administration tools.<\/li>\n<li><strong>Perl:<\/strong> Applied to text processing, integration and system administration.<\/li>\n<li><strong>Bash:<\/strong> Combines commands and automates tasks on Unix and Linux systems.<\/li>\n<li><strong>PowerShell:<\/strong> Combines commands and objects to administer Windows and other compatible systems.<\/li>\n<li><strong>Lua:<\/strong> Commonly embedded in video games, applications and devices.<\/li>\n<\/ul>\n<p>The same file may behave differently depending on the language version, operating system, dependencies and available variables. A script should state or document <strong>the requirements needed to reproduce its execution<\/strong>.<\/p>\n<h2>Script, program, library and framework<\/h2>\n<p>These concepts can be related, but they are not equivalent. A script is executable code generally focused on a task, whereas a program may constitute a complete application. The distinction depends more on function and context than on file size.<\/p>\n<ul>\n<li><strong>Program:<\/strong> A set of components providing complete functionality to a user or another system.<\/li>\n<li><strong>Library:<\/strong> Reusable code exposing functions that other code can call.<\/li>\n<li><strong><a href=\"https:\/\/www.arimetrics.com\/en\/digital-glossary\/framework\">Framework:<\/a><\/strong> A structure that organises an application and defines points where custom code can be added.<\/li>\n<li><strong>Plugin:<\/strong> A component that extends a host application through a supported interface.<\/li>\n<\/ul>\n<p>A library such as jQuery, a framework such as Bootstrap or a platform such as Node.js <strong>is not a script by itself<\/strong>. Each may provide tools or an environment for writing and running scripts, but they belong to different categories.<\/p>\n<h2>Client-side and server-side scripts<\/h2>\n<p>On the Web, a client-side script is downloaded and executed by the browser. It can change the document, respond to events or request additional information. Its access to the device and other websites is restricted by permissions and security policies.<\/p>\n<p>A server-side script runs on the infrastructure handling the request. It can apply business logic, query databases, authenticate users or generate a response. The browser receives the result but <strong>does not need access to the server&#8217;s source code<\/strong>.<\/p>\n<p>The two sides can work together. For example, a browser script initially validates a form and sends the data; the server validates it again, processes it and returns a response. Client-side validation improves interaction but <strong>does not replace server-side security controls<\/strong>.<\/p>\n<h2>Examples of scripts<\/h2>\n<p>Scripts are used for many different tasks, from web page interaction to system maintenance:<\/p>\n<ul>\n<li><strong>Web form:<\/strong> Checking fields and displaying messages before submitting data.<\/li>\n<li><strong>Import:<\/strong> Reading a CSV file, normalising its values and adding them to an application.<\/li>\n<li><strong>Monitoring:<\/strong> Querying a service regularly and sending an alert when it stops responding.<\/li>\n<li><strong>Backup:<\/strong> Packaging files, creating a timestamp and moving the copy to another destination.<\/li>\n<li><strong>Deployment:<\/strong> Running tests, building a release and publishing it to the appropriate environment.<\/li>\n<li><strong>Analytics:<\/strong> Sending events defined by the applicable configuration and consent.<\/li>\n<\/ul>\n<p>Before running an unknown script, its source, instructions and permissions should be reviewed. Code can change or delete information, install components or transmit data. Scripts should be treated as <strong>software capable of producing real changes<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A script is code that performs a specific task. Learn how scripts work, what they are used for, common languages and how they differ from other components.<\/p>\n","protected":false},"author":33,"featured_media":80649,"template":"","encyclopedia-tag":[1273],"class_list":["post-33605","encyclopedia","type-encyclopedia","status-publish","has-post-thumbnail","hentry","encyclopedia-tag-web-programming"],"_links":{"self":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia\/33605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia"}],"about":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/types\/encyclopedia"}],"author":[{"embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/users\/33"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/media\/80649"}],"wp:attachment":[{"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/media?parent=33605"}],"wp:term":[{"taxonomy":"encyclopedia-tag","embeddable":true,"href":"https:\/\/www.arimetrics.com\/en\/wp-json\/wp\/v2\/encyclopedia-tag?post=33605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}