Scripting Languages

27K

Solutions

20K

Contributors

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi,

I have a csv file with Name and Account informations like this:

Name,Account
John,Domain\John
Eric,DomainEric

How can I put Account in a variable but without "Domain\"?
0
Angular Fundamentals
LVL 12
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

I have a text file in 2 columns where column 1 is date in dd/mm/yyyy while column 2 is a user's name.

11/12/2018         aaron
28/12/2018         amber
5/1/2019              ben
2/11/2018            barney
2/1/2019              carl
. . .

Need a Windows batch script (not PowerShell) that when I run today (say it's 18 Jan 2019 today), would lik eto
extract out a list of users where the date in the file is more than 31 days from today's date.  So output will be:

11/12/2018         aaron
2/11/2018            barney
0
Is there a way to export all scripts from a Power Builder application using the IDE all at once to save time. If so how? Is there an external utility tool to do the same as well?
0
Greeting Experts -

I need help creating a PowerShell script to pull a list of user names from Active Directory using each client/users First, Middle, and Last names to find each user in AD.  I don't know how difficult this may be, but if somebody can help with this issue, I would appreciate it.
0
I need to Uninstall Landesk agent remotely on 300 plus servers.

Below is the uninstall command for LanDesk agent that i execute after logging into the server:

UninstallWinClient.exe /UI /NOREBOOT

I want to use psexec for this.

UninstallWinClient.exe needs to be in share path and server list should in a text file

How can i achieve this using psexec?

Ref:https://community.ivanti.com/docs/DOC-2092
0
HI,
I am getting the following error while using ansible playbook :
FATAL: command execution failed
hudson.AbortException: Ansible playbook execution failed
	at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:236)
	at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:207)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:945)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:896)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1724)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:421)
ERROR: Ansible playbook execution failed
Finished: FAILURE

Open in new window


Although this is somewhat random i agree. But any ideas or tips for debugging it or why it could be happening ?

Thanks
0
What is the command line, within a batch, if possible, to start that batch in Administrator mode?
Or would another batch be needed to trigger this batch in Administrator?
0
Hello,

How to add multiple user of different domain in single Forest in One Universal Group

I have with me SAM account name

Group is in Root domain and users are from all child domain

like root domain and child domain is below

abc.com
  xyz.abc.com
  asd.abc.com

Group name is : contoso-adGroup


Please suggest a script

Thanks
Addy
0
hi, I need a script or tool for getting change history audit for last month in "file". Something  like -  name - "file.xls", change date - "01.12.18", changed by - "user01", change type - "modified" .
File is in our file server. thanks
0
Please help to assist on
  • Best Practice to to clean C Drive on 2008 R2 and 2012 R2
  • What if Winsx is consuming much more space in C Drive ?
  • What is standard size required to have minimum size of Os drive @Win 2008 /R2 ,Win 2012 /R2
  • Any Cleanup Script /tool we can use enable for multiple Boxes in domain

Thanks in Advance!
0
C++ 11 Fundamentals
LVL 12
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

I have a Tkinter application (python 2.7) that copies , configures , remove files. During this operation, I would like to pop up a please wait message box without any buttons while the process is running to inform the users What is the best way to do this.
Thank you for your Quick Prompts.
0
I would like to change the script below, to produce a different output.  

Here is the file that contains the data to use.
C:\Users\user\Desktop\Folder\file.txt

ISA*11*          *22*          *33*1234567891234  *BB*ABCDEFGDH       *181127*3445*¬*00100*000000500*1*Q*:!
GS*PO*0012345678912*JDJDLSLA*20181127*3445*600*A*001234!
ST*850*78945611!
BEG*11*AB*12345**20181127!
N1*CD*COMP*LA*0012345678901!
N3*1 Street Drive!
N4*Pineland*OL*12345*US!
N1*AJ*SOMECOMPANY!
N1*TJ*Company Corp*2*456363748!
N3*1 Street Road!
N4*City, Somewhere**12345*u!
N1*AC*Company*2*987654321!
N3*1234 Street Blvd!
N4*Someplace*NY*12345*US!
N1*YG*Company Name*AL*0012345678912!
N3*5 Place Drive!
N4*Ackanhaw*MI*654321*US!
PO1**151*CA***IN*5465*CR*789456*GG*55555*EQ*Case(s)!
PID*F****Description One!
CTT*3****5*PQ!
SE*30*1234567!
GE*5*500!
IEA*1*000004567!


Here is the current script:
$InputFile = "C:\Users\user\Desktop\Folder\file.txt"
$OutputFile = "C:\Users\user\Desktop\Folder\fileR.txt"

Function ParseText ($OutputFile,$InputFile){
Begin{
        $line,$poline,$shipto,$totline,$total,$i,$n3 = $null,$null,$null,$null,$null,0,0
            Set-Content $OutputFile $null
            $Data = Get-Content -Path $InputFile | ?{$_ -match "(BEG\*)|(PO1\*)|(PID\*)|(N\d\*)|(IEA\*)"}
       }
 Process{
       $Data | % {
       #Check the end of data set
             If ($_ -match "IEA\*"){
                   If($poline -ne $null -and $total -ne $null){
                         

Open in new window

0
I would like to use a powershell/vbs script to run the following commands currently found in a .bat file:


@echo off
setlocal 

set password=xxxxxxxx
set /p password=<%~nx0:password
if not "%password%"=="" goto OK
set /p password=Enter password: 
echo %password%>%~nx0:password
:OK

set localdir=\\srv\folder\NewInbound\folder
set remotedir=/out_folder
set ftpserver=ftp.server.com
set username=xxxxxxxx

::del "%localdir%\*.*" /q

call :GetFtpFiles
call :ClearFTPFiles

exit /b

:GetFTPFiles
    (echo open %ftpserver%
    echo user %username% %password%
    echo bin
    echo cd %remotedir%
    echo lcd "%localdir%"
    echo mget *.*
    echo quit
    ) | ftp -n -i
    exit /b

:ClearfTPFiles
    (echo open %ftpserver%
    echo user %username% %password%
    echo cd %remotedir%
    (for /f "tokens=*" %%a in ('dir /b /a-d "%localdir%\*.*"') do @echo dele "%%~a")
    echo quit
    ) | ftp -n -i -d

Open in new window

0
I've got an interesting one for all the PowerShell crew. I often go to websites for a download of an ISO. The site offers many mirror URLs. What would be cool is to copy those URLs to the clipboard and pipe them to a PS script that will attempt to determine which mirror has the least latency. Any gurus out there willing to bite? I think many techs would appreciate such a script/tool in their arsenal.
1
I am trying to learn how to use D3.js so that I can produce graphs for visualized data on my web page which is based on using Javascript.
But I am struggling trying to get an axis scale correctly rendered.
Below is the code where I draw the graph and "attempt" to put the X & Y scales on the axis.   However, if you look at the attach JPG file, the X axis is being drawn at the TOP of the graph, not the bottom where it was supposed to be.   I was calling the d3.axisBottom() as you can seen from the code.  Also, the Y axis is being placed about 10 pixels inside the left side of the graph, again even though I am using the d3.axisLeft() class.  Again you can see this in the attached file screen shot.

From the code below, does anyone have any idea what I am doing wrong?

Thank you,



var dataset = [77,361,7,9,0,0,0,0,0,266,228,454];

var svgWidth = 500;
var svgHeight = 500;
var barPadding = 5;
var barWidth = (svgWidth / dataset.length);

var svg = d3.select('svg')
	.attr("width", svgWidth)
	.attr("height", svgHeight);


var xScale = d3.scaleLinear()
        .domain([0,svgWidth + 150])
        .range([0,svgWidth + 150]);

var x_axis = d3.axisBottom()
        .scale(xScale)
        .ticks(10);

svg.append("g")
        .call(x_axis);

var yScale = d3.scaleLinear()
        .domain([d3.min(dataset),(d3.max(dataset) + 200)])
        .range([svgHeight,0]);

var y_axis = d3.axisLeft()
        .scale(yScale);

svg.append("g")
        .attr("transform", "translate(50,10)")
 

Open in new window

0
Hi...
Trying to create a ISO file using xorriso and getting the below error
xorriso : FAILURE : File exceeds size limit of 4294967295 bytes

Open in new window

is there an option to bypass this size check...
Thank You For Your Quick Prompts. ;)
0
Hi ..
I am going to backup Windows 10. before start the backup i want to cleanup the system
example: removing all the already accessed remote shared folders list (example, doing "\\" in windows explorer lists already access shared drives)...etc.
what is the best safest way to do this...

Thank YOU for your quick prompts. ;)
0
I have a Linux system that I need to modify few configuration files while the system is not be running.
For this reason, I have booted from a ISO file, therefore, the root directory is ISO not the local drive.
Since the script tries to modify few files with the fixed path /etc/, /var,...etc. I need to chroot the local disk.
what is the best way to do this operation, do I need to change any permissions or take ownership of directories or files.

Thank you for quick prompts.
0
I have a script to generate app pools and sites
I want for some sites that the anonymous authentication uses the app pool identity
I know how to do that in the IISmanager but I have a script

this is part of the script
%1 is paramater site name %webloc% is path

%systemroot%\system32\inetsrv\appcmd.exe add apppool /name:www.%1
%systemroot%\system32\inetsrv\AppCmd add site /name:www.%1 /physicalPath:%WebLoc%\www.%1\website /bindings:http/*:80:www.%1
%systemroot%\system32\inetsrv\appcmd set app /app.name:www.%1/ /applicationPool:www.%1
%systemroot%\system32\inetsrv\appcmd set apppool /apppool.name:www.%1 /managedRuntimeVersion:v4.0

This is what my question is about to use the application pool identity as anon user
%systemroot%\system32\inetsrv\appcmd set config /app.name:www.%1/ -section:anonymousAuthentication /username:"" --password
will /app.name:www.%1 work as site name?

or should it be
%systemroot%\system32\inetsrv\appcmd set config www.%1 -section:anonymousAuthentication /username:"" --password
0
Python 3 Fundamentals
LVL 12
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

I have this bit of C Code for a project I working on for a project.  
logit("Username: %s Password: %s", authctxt->user, password);

Open in new window

This is going to be used in a proof of concept project and I want to obscure the real password.  I was thinking of either replacing the whole password with a set of characters or maybe keeping the first and last two characters and replacing the rest with a set of characters.  Maybe Xs.   Looking for suggested modification.
0
I have a setup of 2 PC's connected in Master and Slave configuration through a network cable with Windows 7 OS on both PC's. I need to stop a exe program and do a replace of the corrupted files  in a saved location and restart the exe program through vbscript with progress bar.  Can someone help with a vbscript or guidance? I am not a programmer. The progress should be shown on the master

Thanks in advance,
Vicki
1
Need a python script to copy yesterday files to a destination location and gzip them in destination directory
0
I am looking to copy and paste data from one xlsx sheet to a new excel sheet using VBScripts . Could please some one help me using Vb script to paste exact contents from
excel-input.xlsx to a new excel excel-output,xlsx on sheet2   and rename sheet2 to DataSet.

Here is the

Excel-Input.xlsx
Name      age      gender      department      year
don                23      male      computer      2010
ptalakes       24      female      maths              2015
chang      28      male      arts                2016
prag      29      female      science              2018
tom               26      male      arts                      2017
john      27      female      sports              2018
simon      22      male      arts                      2018

Excel-Output.xlsx  (Rename sheet2 as data )
Name      age      gender      department      year
don                23      male      computer      2010
ptalakes       24      female      maths              2015
chang      28      male      arts                2016
prag      29      female      science              2018
tom               26      male      arts                      2017
john      27      female      sports              2018
simon      22      male      arts                      2018
Excel-input.xlsx
Excel-Output.xlsx
0
need an archival script that runs on a nighty basis

we maintain our logs for a given month in a directory

/a/b/c/2018-01/xyz-2018-01-01-1.log
/a/b/c/2018-01/xyz-2018-01-01-2.log
/a/b/c/2018-01/xyz-2018-01-01-3.log
/a/b/c/2018-01/xyz-2018-01-02-1.log
/a/b/c/2018-01/xyz-2018-01-01-2.log
.
.
.
/a/b/c/2018-02/xyz-2018-02-01-1.log
/a/b/c/2018-02/xyz-2018-02-01-2.log
.
.
.
/a/b/c/2018-02/xyz-2018-02-31-1.log
/a/b/c/2018-02/xyz-2018-02-31-2.log

on a nightly basis we have to copy logs to corresponding months folder with date and tar and gzip

if the directory does not exist for the month we have to create it when copy and tar the files,

ex : /a/b/c/archieve/`date +`'%Y-%m'`/`

we should be maintaining the archived files for the last 3 days and hould be removed older than 3 days
0
How can I modify this script so that it pulls the BCC emails from a file, a text file for instance?

SubjectDate = InputBox("Date to be added to the subject:", "Enter date")
MailTo = "email1@gmail.com"
From = "mainemail@someprovider.com"
Subject = "This is a test " & SubjectDate
Body = "Hi, This is an VBScript to send email, Regards, User."
Username = "mainemail@someprovider.com"
Password = "passwordhere"
BCC = "email2@gmail.com"

Email MailTo, BCC, From, Subject, Body, Username, Password

Sub Email (MailTo, BCC, From, Subject, Body, Username, Password)
 Set objMessage = CreateObject("CDO.Message")
 With objMessage
  .Subject = Subject
  .From = From
  .To = MailTo
  .BCC = BCC
  .TextBody = Body
 End With
 With objMessage.Configuration.Fields
      .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.com"
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
      .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mainemail@someprovider.com"
      .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "passwordhere"
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
      .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
      .Update
      End With
      Set

Open in new window

1

Scripting Languages

27K

Solutions

20K

Contributors

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.