Top "Scripting" questions

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

sudo echo "something" >> /etc/privilegedFile doesn't work

This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux. There …

bash shell scripting permissions sudo
How to store the hostname in a variable in a .bat file?

I would like to convert this /bin/sh syntax into a widely compatible Windows batch script: host=`hostname` echo ${host} …

windows batch-file scripting hostname
Purpose of #!/usr/bin/python3

I have noticed this in a couple of scripting languages, but in this example, I am using python. In many …

python scripting
How to get the part of a file after the first line that matches a regular expression?

I have a file with about 1000 lines. I want the part of my file after the line which matches my …

bash shell scripting grep
VBA: How to display an error message just like the standard error message which has a "Debug" button?

As usual, I create an error-handler using On Error Goto statement, there I put a few lines of cleaning codes …

vba scripting excel ms-office
What does `set -x` do?

I have a shell script with the following line in it: [ "$DEBUG" == 'true' ] && set -x

linux bash unix scripting
Windows batch: sleep

How do I get a Windows batch script to wait a few seconds? sleep and wait don't seem to work (…

windows shell batch-file scripting
Using sed, Insert a line above or below the pattern?

I need to edit a good number of files, by inserting a line or multiple lines either right below a …

scripting sed awk
Random number from a range in a Bash Script

I need to generate a random port number between 2000-65000 from a shell script. The problem is $RANDOM is a 15…

bash shell scripting
Execute PowerShell Script from C# with Commandline Arguments

I need to execute a PowerShell script from within C#. The script needs commandline arguments. This is what I have …

c# command-line powershell scripting arguments