Scripting is a form of programming generally characterized by low formality, loose typing, and no requirement for explicit compilation. There are numerous scripting languages, and these are used in a wide variety of scenarios - command-line applications, GUIs, server-side applications, extension ...
0
votes
2answers
45 views
ruby notes scrubber search for specific characters [closed]
I am looking to making a not scrubber for my testing notes. I want to run a script that will read the entire file looking for special "tags" that I made in my notes, like @ ? (c) etc...
I then want to ...
1
vote
1answer
42 views
Python script to update a cPanel zone record with my public IP
This is my first attempt at using Python to send http requests. I want to keep a zone record on cPanel pointed at my home network's public IP. I'm just looking for some general feedback/suggestions. ...
-1
votes
1answer
22 views
bash file manipulation [closed]
I have files in a directory named so:
1welcome.avi
2introdution.avi
I have a rhcsa.txt file that has what these files should be named as:
rhcsa_1_welcome.avi
rhcsa_2_introduction.avi
both the ...
2
votes
1answer
47 views
Improve a script to generally check status of several git repos
I've tried to write a bash script that gives me a general overview of the status of git repos I have cloned/created. It's not meant to replace git status by any means, but give an overview of several ...
1
vote
1answer
30 views
Batch script review please?
Write a batch script which configures this list of commands :
Put the name of the window "Cmd configuration"
Put the color of the text in green.
Put the prompt character "$"
Show the message "Cmd ...
3
votes
2answers
95 views
Bash Script(beginner) - Code Improvement Suggestions
I am writing a simple script to automate my regression testing. I am new to bash scripting and my goal is achieve the most efficient and clean code. I have written a simple function to allow me to ...
4
votes
1answer
160 views
Renaming Files and/or Directory
I'm quite new to Python and would love to gather feedback on my code. I've written a piece a script that allows me to search all file or directory names within a folder matching a particular pattern. ...
0
votes
0answers
45 views
Power Shell Zip a Directory
Brand new to Power Shell, writing some utilities for non-devers. The function below zips a directory using 7Zip. It works just fine, but I'm looking for some feedback on the use of Power Shell. Are ...
3
votes
3answers
194 views
Shell script to sync dotfiles repository
I'm doing the git dot files thing and created a script -- my first Unix shell script -- to synchronise the repo dot files with those in the user's home. It checks which dot files exist in the repo ...
2
votes
1answer
310 views
Creating a basic secure php mailer
I am busy creating a basic php mailer script to post to _self and email to a address.
Is the script secure?
How can I avoid someone clicking on submit the whole time, to spam the mailbox, with ...
2
votes
1answer
413 views
Powershell Script for Manipulating Excel Files
I am a newbie at scripting so be easy. I have a directory of xls workbooks with the following naming convention:
001.WIP Monthly Report
002.WIP Joes Custom Report
...
129.PUR Supplier Spend
The ...
2
votes
2answers
82 views
How to improve the way I handle greping in this script
What my script does is:
Append data to a file on a continuous basis.
If an error pattern is observed, then do something.
I need feedback on the way I am grepping for patterns in the continuously ...
3
votes
1answer
135 views
Parsing Oracle errors with a ksh function
Some time ago I wrote a small routine to run some quick n' dirty queries (and with that I mean it is not used for large queries) against an Oracle DB, but also wanted to do it a bit easier to parse ...
2
votes
1answer
120 views
Twitter scanner
How can I script this in a better way?
// Tweets
$twitter_username_string = "aasampat OR ashwinsampat OR somemore";
$twitter_number_of_tweets = 1;
$twitter_hashtags = ...
2
votes
2answers
170 views
New to PHP, can I script this in a better way?
How can I code this in a better way, in one file? Output must be more than one (if there is more that one status_update with the given word "online or performancedegradation"),like:
#online
System is ...
2
votes
0answers
46 views
Word problem solver in applescript — a mess
I'm having a difficult time creating functions. I can't really encapsulate code because it's used all over the place, and needs to be refactored. However, this is a complete rewrite from my old ...
2
votes
2answers
264 views
bash script for printer administration
#!/bin/bash
# Used to add/remove printers from system (lp)
# Copyright Fresh Computer Systems Pty Ltd.
GREP_OPTIONS='--color=tty'
export GREP_OPTIONS
sanity() {
# Are we root?
if [ $EUID ...
6
votes
4answers
217 views
How can I make this password search more inteligent?
In a homework, there is exercice when I have a script that is used to search a password.
One of the questions is if is possible to make it "more inteligent", and I'm stuck on it.
The script:
...
2
votes
1answer
539 views
Javascript-generated Social Media Links - a more valid, improved way of writing this?
I'm still fairly new with Javascript, and wrote something to generate some social media links on my page. The idea was to have that script grab the necessary URL info and feed it to the social media ...
2
votes
1answer
286 views
shuffle data and get it back from database table… check my code
var RetrieveQuestionURL = "http://"; your server address...having php file
var Ques_in_Array : Array;
var newArray : Array;
var arr : Array;
var Ques_n_Ans : String;
var Score : int = 0;
var ...
7
votes
2answers
610 views
Please help me find the bottleneck in my code
I'm making a scripting language parser and it's shaping up well but it takes is about 30ms to do 30 or so odd/even checks.
Profiler tells me that it's taking most of the time in the ...
6
votes
0answers
138 views
Factor script to change case of all filenames in a directory
In the absence of a full-fledged tutorial, I am teaching myself to program in the Factor language by writing a bunch of functions that I will eventually use in command-line scripts.
One common ...