Tag: script
-
How to run a shell script in OS X by double-clicking
First in terminal make the script executable by typing: chmod a+x (yourscriptname) Then, in Finder, right-click your file and select “Open with” and then “Other…”. Here you select the application you want the file to execute into, in this case it would be Terminal. To be able to select terminal you need to…
-
Changing C# template for Unity
The template files for Unity’s scripts are kept in Program FilesUnityEditorDataResourcesScriptTemplates The new behaviour script, the most common one is called (or something similar, depending on version) 81-C# Script-NewBehaviourScript.cs.txt
-
Simple script to backup all SQL Server databases
[draft] DECLARE @name VARCHAR(50) — database name DECLARE @path VARCHAR(256) — path for backup files DECLARE @fileName VARCHAR(256) — filename for backup DECLARE @fileDate VARCHAR(20) — used for file name SET @path = ‘C:\Backup\’ SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) DECLARE db_cursor CURSOR FOR SELECT name FROM master.dbo.sysdatabases WHERE name NOT IN (‘master’,’model’,’msdb’,’tempdb’) OPEN db_cursor FETCH NEXT…
-
How to list all the databases on a SQL server
You can list all the databases on a SQL server by running the following query. SQL> select name from sys.sysdatabases