Top "Scripting" questions

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

How to delete items from a dictionary while iterating over it?

Is it legitimate to delete items from a dictionary in Python while iterating over it? For example: for k, v …

scripting dictionary python
awk without printing newline

I want the variable sum/NR to be printed side-by-side in each iteration. How do we avoid awk from printing …

scripting awk newline
How to pass boolean values to a PowerShell script from a command prompt

I have to invoke a PowerShell script from a batch file. One of the arguments to the script is a …

scripting powershell
unix - count of columns in file

Given a file with data like this (i.e. stores.dat file) sid|storeNo|latitude|longitude 2|1|-28.03720000|153.42921670 9|2|-33.85090000|151.03274200 What would …

linux bash shell unix scripting
How can I ssh directly to a particular directory?

I often have to login to one of several servers and go to one of several directories on those machines. …

bash shell scripting ssh
How to tell if a string is not defined in a Bash shell script

If I want to check for the null string I would do [ -z $mystr ] but what if I want to …

bash shell scripting string null
How to get the Parent's parent directory in Powershell?

So if I have a directory stored in a variable, say: $scriptPath = (Get-ScriptDirectory); Now I would like to find the …

powershell scripting
How to resolve symbolic links in a shell script

Given an absolute or relative path (in a Unix-like system), I would like to determine the full path of the …

bash shell scripting symlink
How to show a GUI message box from a bash script in linux?

I'm writing a few little bash scripts under Ubuntu linux. I want to be able to run them from the …

linux bash scripting ubuntu gtk