Questions tagged [scripting]

A form of computer programming that — in the context of system administration — lends it self well to automating tasks.

A form of computer programming that — in the context of system administration — lends it self well to automating tasks.

Scripting is usually done in a scripting language. Such scripting languages are often dynamically typed and interpreted, as opposed to compiled languages. Examples of such languages include PowerShell, Perl and Bash.

1826 questions
0
votes
1 answer

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

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…
mjbraun
  • 139
  • 1
  • 8
0
votes
3 answers

When to use Bash, when Python/Perl/Ruby?

What's your rationale for when to write a Bash script and when to use a more powerful scripting language (Python, Perl, Ruby, ...)? I'm finding that very simple scripts are nicer with Bash, but many of those get quite fancy over time, and it never…
futlib
  • 111
  • 1
0
votes
2 answers

Call 'script' command and exit it from within a bash script

I'm using the linux 'script' command http://www.linuxcommand.org/man_pages/script1.html to log all input and output in an interactive bash script. At the moment I have to call the script command, then run my bash script, then exit. I want to run the…
0
votes
1 answer

run script for all users

I put some script on my ubuntu linux in /etc/profile.d/myscript.sh but it's just work on my user. But it's work only user logged in not when I use sudo. # myscript.sh export MYVAL="HELLO" echo $MYVAL // HELLO sudo echo $MYVAL // ?!
0
votes
3 answers

Remotely initiate windows updates

I have a network with countless workstations on it and the windows updates are done through WSUS in push cycles to allow us to use a generic image and configuration and avoid network congestion. I have a number of workstations in storage that are…
TetraFlash
  • 111
  • 1
  • 1
0
votes
1 answer

Quick way to duplicate zones in BIND

We have a standard high-availability setup at a co-location facility that we host client programs on. For some programs, we host the DNS, but I find that setting up multiple zones manually can be tedious and prone to error. Is there an easy way to…
Chris
  • 869
  • 1
  • 7
  • 13
0
votes
1 answer

How can I run an elevated powershell script as part of VMWare Customization Specification?

Background / Goal I have a VMWare template that I am deploying and I am using VMWare's "customization specifications" to perform many of the sysprep tasks. The last thing I need to accomplish is the silent install of several applications in…
0
votes
1 answer

Is there a tool that can take partition table information and partition another based on it?

Is there a tool that can read the partitioning information of a disk and partition another disk based on that information? I don't know whether parted for instance can partition a disk based on a script, or whether there is a tool that can read a…
vfclists
  • 1,632
  • 5
  • 22
  • 37
0
votes
1 answer

Bash and double quotes escaping

If I run some thing like this in shell: curl -I http://example.com -H "If-None-Match: \"da8e7e-557a9-4cbc6f2e68780\"" I get correct result, but when I'm trying ro tun it in my bash script: http_code=$(curl -I $SELL_URI -H "If-None-Match:…
user1081056
  • 123
  • 4
0
votes
1 answer

Why does this script stop/fail to continue in Ubuntu 10.04

I have the following script, which works fine until the end of the script where the line to install JRuby 1.7.0.RC2 works, but then the script stops. I added $? at the end of the script to try to get it to output the exit code from the previous line…
jefflunt
  • 300
  • 3
  • 15
0
votes
3 answers

How to clear contents of all the files using find command

Is there an easy step to clear contents of all ".log" file using find command. Currently i am using "echo -n > filename.log" i have tried echo -n > /var/application-logs/*.log but it is not working.. is there a better way to clear contents of…
hariharan
  • 3
  • 1
  • 3
0
votes
4 answers

How can i find firewall rules and settings via command line in linux

I'm writing a script to find all the firewall details, routing information, and important network related via command line. I can fetch the firewall configuration with iptables -nvL, but I'm not sure about the rest. What commands should I use to…
San
  • 11
  • 1
  • 2
0
votes
1 answer

How to rename multiple files by replacing word in file name geting from the shell script variables?

This question like this thread. How to rename multiple files by replacing word in file name? My example is more complex than the above topic. The two variables are $name and $ newname getting from the shell script other location. $name and $…
fy6877
  • 1
  • 1
0
votes
1 answer

Drive mappings being lost overnight

I have an interesting problem. I have a Server 2003 environment, with a Windows XP computer that continually loses its drive mappings overnight. No other users report this problem. The user reports that drive mappings simply disappear with no real…
0
votes
1 answer

How do I run a process remotely from inside a shell script?

What I am trying to do is to run the shell script 'ABCDE' on one machine, but use another machine to support it. ABCDE is an all-in-one ripper/encoder/tagger script for turning CD's into digital files. I have one machine which has a fast CD drive,…
SethP