Top "Scripting" questions

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

How do I remove newlines from a text file?

I have the following data, and I need to put it all into one line. I have this: 22791 ; 14336 ; 22821 ; 34653 ; 21491 ; 25522 ; 33238 ; I need …

linux bash scripting shell sed
Python recursive folder read

I have a C++/Obj-C background and I am just discovering Python (been writing it for about an hour). I …

python scripting file-io
Executing multiple commands from a Windows cmd script

I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the …

windows batch-file scripting cmd
How do you execute an arbitrary native command from a string?

I can express my need with the following scenario: Write a function that accepts a string to be run as …

scripting powershell
How do I get the result of a command in a variable in windows?

I'm looking to get the result of a command as a variable in a Windows batch script (see how to …

windows scripting batch-file
Checking for the correct number of arguments

How do i check for the correct number of arguments (one argument). If somebody tries to invoke the script without …

shell scripting
How do I write a bash script to restart a process if it dies?

I have a python script that'll be checking a queue and performing an action on each item: # checkqueue.py while …

bash scripting cron
What is a simple command line program or script to backup SQL server databases?

I've been too lax with performing DB backups on our internal servers. Is there a simple command line program that …

sql-server command-line scripting backup
How to check the extension of a filename in a bash script?

I am writing a nightly build script in bash. Everything is fine and dandy except for one little snag: #!/bin/…

bash scripting file
Shell script to capture Process ID and kill it if exist

I tried this code and it is not working #!/bin/sh #Find the Process ID for syncapp running instance PID=`…

bash shell scripting