Top "Scripting" questions

Scripting is a form of programming generally characterized by low formality, loose typing, and no requirement for explicit compilation.

How can you find and replace text in a file using the Windows command-line environment?

I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text …

windows command-line scripting batch-file text-files
In a Bash script, how can I exit the entire script if a certain condition occurs?

I'm writing a script in Bash to test some code. However, it seems silly to run the tests if compiling …

bash scripting exit exit-code
Find and Replace Inside a Text File from a Bash Command

What's the simplest way to do a find and replace for a given input string, say abc, and replace with …

bash ssh replace scripting ironpython
Why do you need to put #!/bin/bash at the beginning of a script file?

I have made Bash scripts before and they all ran fine without #!/bin/bash at the beginning. What's the point …

linux bash scripting shebang
How to get disk capacity and free space of remote computer

I have this one-liner: get-WmiObject win32_logicaldisk -Computername remotecomputer and the output is this: DeviceID : A: DriveType : 2 ProviderName : FreeSpace : Size : …

powershell scripting powershell-2.0
How to redirect the output of a PowerShell to a file during its execution

I have a PowerShell script for which I would like to redirect the output to a file. The problem is …

powershell scripting stdout
How can I remove the first line of a text file using bash/sed script?

I need to repeatedly remove the first line from a huge text file using a bash script. Right now I …

bash scripting sed
How do I get the path and name of the file that is currently executing?

I have scripts calling other script files but I need to get the filepath of the file that is currently …

python scripting file
Test or check if sheet exists

Dim wkbkdestination As Workbook Dim destsheet As Worksheet For Each ThisWorkSheet In wkbkorigin.Worksheets 'this throws subscript out of range …

excel vba scripting