Search Results

Search found 2544 results on 102 pages for 'scripting'.

Page 25/102 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Using Gentoo's `ebegin`, `eend` etc under Ubuntu

    - by Marcus Downing
    We're quite fond of the style of the ebegin, eend, eerror, eindent etc commands used by Portage and other tools on Gentoo. The green-yellow-red bullets and standard layout make for very quick spotting of errors, on what would otherwise be very grey command line output. #!/bin/sh source /etc/init.d/functions.sh ebegin "Copying data" rsync .... eend $? Producing output similar to: * Copying data... [ OK ] As a result we're using these commands in some of our common shell scripts, which is a problem for the people using Ubuntu and other linuxes. (linuces? linuxen? linucae? other distros) On Gentoo these functions are provided by OpenRC, and imported with functions.sh file (whose exact position seems to vary slightly). But is there a simple way of getting these commands on Ubuntu? In theory we could replace them all with dull echos, but we'd rather not?

    Read the article

  • Move all images in folder to subfolder, and update all references to those images to their new location?

    - by Professor Frink
    I have a folder which contains a ~50 text files (PHP) and hundreds of images. I would like to move all the images to a subfolder, and update the PHP files so any reference to those images point to the new subfolder. I know I can move all the images quite easily (mv *.jpg /image, mv *.gif /image, etc...), but don't know how to go about updating all the text files - I assume a Regex has to be created to match all the images in a file, and then somehow the new directory has to be appended to the image file name? Is this best done with a shell script? Any help is appreciated (Server is Linux/CentOs5) Thanks!

    Read the article

  • How to add a shutdown script (not by using gpedit.msc or active directory)?

    - by Francis
    I have created a script I want to deploy on my XP workstations as a shutdown script. I know I can add my script as a shutdown script with the UI (gpedit.msc), but I want to automate the deployment of my script. My workstations are not part of a Windows domain. I will deploy with OCS Inventory. I tried to add entries to the Windows registry, but this doesn't work. I don't see what I added when I run gpedit.msc. If I add something with gpedit.msc, this seem to overwrite what I added manually into the registry.

    Read the article

  • VBS script works on XP 32-bit but not on 7 64-bit

    - by neurolysis
    This script (a modification of one of Rob van der Woude's) works fine on XP 32-bit, but fails on 7 64-bit at Set objDialog = CreateObject( "UserAccounts.CommonDialog" ), with something similar to the error (translated from Dutch) ActiveX cannot create the object "UserAccounts.CommonDialog". Is there some different way that I have to do this for it to be compatible with Windows 7? MsgBox("Your input avi MUST be exported at 60fps, or this script will not work."),0,"IMPORTANT!" MsgBox("Please select the location of your AVI."),0,"AVI location" WScript.Echo GetFileName( "", "AVI files (*.avi)|*.avi" ) Function GetFileName( myDir, myFilter ) Dim objDialog Set objDialog = CreateObject( "UserAccounts.CommonDialog" ) If myDir = "" Then objDialog.InitialDir = CreateObject( "WScript.Shell" ).SpecialFolders( "MyDocuments" ) Else objDialog.InitialDir = myDir End If If myFilter = "" Then objDialog.Filter = "All files|*.*" Else objDialog.Filter = myFilter End If If objDialog.ShowOpen Then GetFileName = objDialog.FileName Else GetFileName = "" End If End Function

    Read the article

  • Scripted printer configuration changes

    - by David Steven
    I've got about a dozen Windows XP machines that I need to make a couple specific printer configuration changes to. The printer is "virtual" printer for an electronic delivery service. I'd like to not have to visit each machine individually. I already have the means to execute commands remotely on the machines, I just can't seem to find away to adjust these settings via command line or script. Specifically I need to be able to make the following changes: 1) As an admin user: - Device Settings - Font Substitution Table/Courier New - Change to "Courier" 2) As a specific* user: - Printer Preferences - Paper/Quality - Advanced - Change Graphic/Print Quality to "600 x 600" - Change Document Options/Printer Features/Graphics Mode to "HP-GL/2" *This change is a per user configuration, unless there's some way to make it once. In this situation I only really need it for a specific (different) user on each machine.

    Read the article

  • Create kickstart configuration file from existing configuration.

    - by ÜMineiro
    Is there a script or another way to automatically generate a kickstart configuration file from the system state of an existing server so that the file can be use to replicate (not clone) the configuration of the system in another install? I know that the anaconda-ks.cfg file is stored on the /root dir. but the system in question have been extensively changed since it's installation, and the file is of no use now.

    Read the article

  • simple script to backup PostgreSQL database

    - by Mick
    Hello I write simple batch script to backup postgeSQL databases, but I find one strange problem whether the pg_dump command can specify a password? There is batch script: REM script to backup PostgresSQL databases @ECHO off FOR /f "tokens=1-4 delims=/ " %%i IN ("%date%") DO ( SET dow=%%i SET month=%%j SET day=%%k SET year=%%l ) SET datestr=%month%_%day%_%year% SET db1=opennms SET db2=postgres SET db3=sr_preproduction REM SET db4=sr_production ECHO datestr is %datestr% SET BACKUP_FILE1=D:\%db1%_%datestr%.sql SET FIlLENAME1=%db1%_%datestr%.sql SET BACKUP_FILE2=D:\%db2%_%datestr%.sql SET FIlLENAME2=%db2%_%datestr%.sql SET BACKUP_FILE3=D:\%db3%_%datestr%.sql SET FIlLENAME3=%db3%_%datestr%.sql SET BACKUP_FILE4=D:\%db14%_%datestr%.sql SET FIlLENAME4=%db4%_%datestr%.sql ECHO Backup file name is %FIlLENAME1% , %FIlLENAME2% , %FIlLENAME3% , %FIlLENAME4% ECHO off pg_dump -U postgres -h localhost -p 5432 %db1% > %BACKUP_FILE1% pg_dump -U postgres -h localhost -p 5432 %db2% > %BACKUP_FILE2% pg_dump -U postgres -h localhost -p 5432 %db3% > %BACKUP_FILE3% REM pg_dump -U postgres -h localhost -p 5432 %db4% > %BACKUP_FILE4% ECHO DONE ! Please give me advice Regards Mick

    Read the article

  • Temporary file storage - script for webserver

    - by Chris
    I'm looking for a script (preferably php) which I can use for to temporarily exchange files. I had such a script before (it was written in flash), but - damn - just can't find it anymore. Here the features I'm looking for: I have a logon, which allows me to create "upload spaces". for these "upload spaces" I define a time how long the space will be available for (until the files are deleted), and who can access it - in the means of typing in an email, and that user gets a link with the "online space", user ID and password. the other user then clicks on the link and uploads the file, and I get (preferably) an email should there be any file changes I get an email before the content gets deleted Now, 3 additional things: - it should be open- source - run on linux (preferably lamp) - no, I dont wanna use dropbox or similar :p Thanks in advance everybody, Cheers Chris

    Read the article

  • What is wrong with my expect script?

    - by Bryan
    I'm trying to learn how to use the expect command, to help me automate deployment of some software via shell scripts, and figured I start with something simple to get me started. I've created a file in my home dir called 'foo' using: touch foo And I've created the following script saved as test.exp #!/usr/bin/expect spawn rm -i foo expect "rm: remove regular empty file `foo'?" send "y\r" When I run the script using ./test.exp, it spawns the rm command, but it doesn't appear to send the Y and carriage return. I know I don't have a typo in the expect string, as I've used copy and paste to put in the script. What am I doing wrong?

    Read the article

  • Check availability of my websites

    - by DeChinees
    Hi, How can I check the availability of websites from hosted by company? Ping the server and checking if the services for IIS or Apache/Tomcat is not enough. I want to see if the sites are responsive, if I can login. My idea is to build a script using cURL to access the websites and parse for certain words. However using cURL to access a secure site (HTTPS://www.fleetagent.be) doesnt seem to work. cURL might not be the best tool! Any ideas how to check the availability of this website? Thanks in advance, Darrell

    Read the article

  • Spawned Process Terminated in GP Startup Script

    - by Charles Gargent
    I have a Group Policy Startup Script which runs synchronously. I now need this script to run one process asynchronously. So far I have managed to get the spawned process running via the command below, however once the rest of the script finishes and the GP Startup Script "phase" finishes and the logon prompt is shown, my spawned process is terminated. Is there any way to have this process continue beyond the Startup Script phase? cmd /c start spawned.bat I guess the reason why it terminates is because the process was launched by the Startup Script process and when the parent process terminates so do its children. PS I need it to be launched via the exisitng script.

    Read the article

  • How to stop basic Postfix after-queue script from BCC-ing sender?

    - by mjbraun
    I'm building a content filter for Postfix (2.9.3 package installed via apt on an Ubuntu 12.04 test VM) and I'm starting with a very basic Ruby (1.9.3) template and building up functionality. Strangely, when the script is enabled, messages sent are being forwarded on as normal, but also sent back to the sender which is not normal. Disabling the script disables this behavior. Any suggestions about what I have to change to stop that from happening? Thanks for any advice! /etc/postfix/master.cf (only the lines changed from the default) smtp inet n - - - - smtpd -o content_filter=dumper:dummy ... dumper unix - n n - 10 pipe flags=RF user=mailuser argv=/home/mailuser/mailfilter/dumper.rb ${sender} ${recipient}` /home/mailuser/mailfilter/dumper.rb #!/usr/bin/env ruby require 'open3' dir="/home/mailuser/emails" logfile="maillog.log" message = $stdin.read cmd = "/usr/sbin/sendmail -G -i #{ARGV[0]} #{ARGV[1]}" stdin, stdouterr, wait_thr = Open3.popen2e(cmd) stdin.print(message) logfile = File.open("#{dir}/#{logfile}", 'a') logfile.write(stdouterr) stdin.close stdouterr.close exit(0)

    Read the article

  • Backup script to FTP with timed subfolders

    - by Frederik Nielsen
    I want to make a backup script, that makes a .tar.gz of a folder I define, say fx /root/tekkit/world This .tar.gz file should then be uploaded to a FTP server, named by the time it was uploaded, for example: 07-10-2012-13-00.tar.gz How should such backup script be written? I already figured out the .tar.gz part - just need the naming and the uploading to FTP. I know that FTP is not the most secure way to do it, but as it is non-sensitive data, and FTP is the only option I have, it will do. Edit: I ended up with this script: #!/bin/bash # have some path predefined for backup unless one is provided as first argument BACKUP_DIR="/root/tekkit/world/" TMP_DIR="/tmp/tekkitbackup/" FINISH_DIR="/tmp/tekkitfinished/" # construct name for our archive TIME=$(date +%d-%m-%Y-%H-%M) if [ $1 ]; then BACKUP_DIR="$1" fi echo "Backing up dir ... $BACKUP_DIR" mkdir $TMP_DIR cp -R $BACKUP_DIR $TMP_DIR cd $FINISH_DIR tar czvfp tekkit-$TIME.tar.gz -C $TMP_DIR . # create upload script for lftp cat <<EOF> lftp.upload.script open server user user password lcd $FINISH_DIR mput tekkit-$TIME.tar.gz exit EOF # start backup using lftp and script we created; if all went well print simple message and clean up lftp -f lftp.upload.script && ( echo Upload successfull ; rm lftp.upload.script )

    Read the article

  • Windows PE 3.0 detect what device it was booted from

    - by Brian
    I am creating a custom boot disk for work using Windows PE 3.0. I need to be able to tell what drive the system was booted from. it may be a CD, or a USB Flash drive. In the past, I have looked for a file on the root of the drive that holds some of our custom configuration. however that is getting a bit messy. Basically, in addition to Windows PE, the drive or disk also has other scripts and tools. I need to remount that USB drive or DVD to the U:\ Drive, to keep thing consistent. Basically, Diskpart.exe Select Volume $X assign Letter=U Exit I just need to figure out how to determine that nasty little $X.

    Read the article

  • script Disk Management configuration

    - by Joseph
    I have 10 workstations with large monitors that have USB slots and several card readers built in. The card readers cannot be disabled and will map to drive letters when I image the computers. I go into Disk Management and delete the drive mappings and add mappings to a single folder in C:\ with a folder for each slot. I have to do this because of scripts that run that are expecting specific letter drive mappings to network resources. Is there a way to script the deleting and adding of drive mappings instead of having to use the Disk Management GUI manually on each workstation? The workstations are running XP Professional.

    Read the article

  • Why doesn't this script work?

    - by Devin
    I've been using this bash script: for i in $(ls); do mv $i a$i; done to prepend all filenames in a folder with the letter a. I'm afraid that at some point I'll accidentally use this script in the wrong directory and prepend a ton of filenames that I don't want prepended. So I decided to explicitly cite the path to the file. So now my script looks like this: for i in $(ls /cygdrive/c/Users/path/to/Images); do mv /cygdrive/c/Users/path/to/Images/$i /cygdrive/c/Users/path/to/Images/a$i; done It does prepend the filename with the letter a, but it also appends the filename with this ? symbol. Any ideas why it would do that? If it helps any, I'm using cygwin on a Windows 7 box. Thanks for the help!

    Read the article

  • AutoMatically Creating New Sites When New Users Sign Up

    - by Eddy Freeman
    I would like to know how hosted eCommerce sites like www.shopify.com, www.3dCart.com etc.. automatically creates new sites when new users sign up. What kind of tools do they use to create those sites into the users profile. I have tried googling but couldn't find an answer. Does any of you guys have any knowledge or experience that you can share with me? Or do you know a tutorial that you can point me to? I hope my question is clear. Thanks for your help.

    Read the article

  • How can I set the BIOS/EFI security password on IBM System x servers by script/ASU?

    - by christian123
    I want to deploy IBM System x servers (like IBM System x 3550 M2) automatically and need to set a security password in the bios (actually it's uefi). I found this nice tool named ASU: http://www-947.ibm.com/systems/support/supportsite.wss/docdisplay?brandind=5000008&lndocid=MIGR-55021 Unfortunately I cannot see an option to set the password. Forum searches only show me people who want to reset the password using this tool. Does anybody know how to automatically deploy system passwords on IBM Intel-based servers?

    Read the article

  • Move some iTunes library items to different drive?

    - by Sören Kuklau
    My internal hard drive is somewhat small, and I only regularly listen to a fraction of my iTunes library anyway, so I'd like to keep large portions on it on an external drive for archival purposes. Since dealing with multiple iTunes libraries is somewhat painful, the solution I'm looking for is to move individual items of the library to a different location, without compromising the "Keep organized" and "Copy files" settings. I found an AppleScript that I assume is supposed to do this, Move Files To Folder…, but it instead copies them, and doesn't update the library accordingly. I can do this manually by moving the file, then accessing it in iTunes — it'll prompt me for the new location. I just don't intend to do this one by one for thousands of files.

    Read the article

  • How to run linux bash script from web browser?

    - by sahil007
    Hi I have web server on it also. I had made simple bash script using vi editor..which will open file and then add some lines into it at last it will save automatically...and after that 2-3 linux command will be run as a specific user. Now I want to do the same from web browser...so what I need to do for this? html?perl?python?cgi?....?which is easy way to do the same?

    Read the article

  • Windows XP autostart process as administrator

    - by Zulakis
    I am looking for a way with which i can autostart a certain program on logon of a user with user-rights with administrator-rights. I already tried using task scheduler but it didn't work out because you got to enter a username with format machine\user and our pxe-image-deployment-system automatically patches the machine names so the entered domain\user stopped working. UPDATE: the runas.exe command does not seem appropiate for this task, too. If using /user:machinename\Administrator /savcred it is invalid after imaging. What one user suggested was using .\Administrator or localhost\Administrator but both didn't work on my XP SP3 machines.

    Read the article

  • Delete temporary files from batch script in xp

    - by Keith Bentrup
    I'm looking for a good batch script that would quickly find & clean all the known safe temporary folders/files from Windows (as many variants as possible) machines (e.g. the windows temp folder, all users IE temp folders, etc.). I'm fond of UI tools like CCleaner (over Cleanmgr.exe), but when I'm trying to clean several computers quickly and/or with minimal involvement, it would be nice to have a script. Plus with a script, I could chain several scripts together. Maybe one to then fire up various antivirus and/or malware detectors. Anyone have a good one or can point to a good resource?

    Read the article

  • How do I mount an Exchange mail store from the Windows Command Line?

    - by Cypher
    Our Exchange server is running Exchange Server 2003 Standard on the Windows Server 2003 platform. We're dealing with the mail store size issue, where if the mail store goes over the limit, it gets dismounted. While we are working with the powers-that-be on a policy that will prevent this happening in the future, I would like to see if it is possible to re-mount the mail store via the Windows CLI. I'm already monitoring the Event Logs and alerting on mail store warnings and dismounts - I'm just tired of getting up at 5am to manually re-mount the store while the political wars ensue. My alerting tools have the ability to execute a batch script when an alert is generated. I would greatly prefer a native CLI option. I'm not too keen on running some random vbscript found on the Internet and I don't really care to spend my time debugging someone else's code. PowerShell might be an option, if it can be triggered from the CLI.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >