Questions tagged [scripting]
This tag is non-specific. Use a specific script tag instead. The following tags are much more specific: [awk] [bash] [bat] [google-apps-script] [javascript] [perl] [php] [python] [ruby] [sh] [powershell]
17,029
questions
0
votes
1
answer
25
views
Develop Script To Backup All User Data For All Users in Specific Folders At Once
Problem:
New application install is forcing a complete wipe of system settings for this particular application, Alteryx, used for data analytics in our organization. Our desire is to create a backup ...
0
votes
0
answers
18
views
second bat is not executed PowerShell script
the below bat files are being called by PowerShell script, however only bat1.bat is executed the others bat2.bat and last.bat are not being called
#first bat
Start-Process "C:\bat1.bat" -...
0
votes
0
answers
21
views
Script to replace string of text at a end of a line
I would like to modify this script if possible:
((Get-Content -path "C:\Users\User1\OUT\Summary.txt" -Raw) -replace '</ab></cb>','</x>') | Set-Content -Path "C:\Users\...
0
votes
0
answers
20
views
Need recommendations for learning shell scripting [closed]
Are there any good sources to learn shell scripting?
I have read Shell scripting by Jason Cannon which is good but are there any other good sources preferably with lots of examples.
0
votes
0
answers
19
views
Is it possible to make the javascript run automatically counting in the user's balance?
I have a php and java script that counts a value per minute online browsing the site I wanted to know if it is possible to do it in the scripts that automatically count the value per minute in the ...
0
votes
1
answer
19
views
How can we save a file with different save as type version using python? [closed]
Word XML document (.xml) to Word 2003 XML Document(.xml),using python code.
Here, changing the extension does not work as .xml is same for both.
0
votes
1
answer
34
views
VBA MS Access- Run-time error 3129 "Operation not valid/allowed"
so I am getting that error message at "Set EXO_Model....". What I am trying to do is say that if that field from that table has X value, then...... But I think I am missing something very ...
0
votes
1
answer
13
views
script should point to the symlink
I have a shell script which is used to deploy packages in udeploy I want to add my symlink to that shell i.e when the process is starting to run in udeploy my script should first refer the symlink and ...
0
votes
1
answer
28
views
Not able to get float value as an output in shell scripting
When I try to divide values like you can see in below code snippet when value gets in float it doesn't shows me the float? It just prints 0. I'm doing MB to GB conversion. Anybody can help me to let ...
-1
votes
0
answers
33
views
how to write a batch script to open a program and start typing inside that program?
I am new to batch, I do repetitive tasks at work and I wanted to automate some of it. How do I write a script to open a program then start typing within that program in specific input like my login ...
-1
votes
0
answers
15
views
KATALON - NO DRIVER IS SET FOR EXECUTION
I want to execute my test case, but when I re-run the web record, KATALON shows ROOT CAUSE error:
Caused by: com.kms.katalon.core.exception.StepFailedException: No driver is set for execution.
For ...
1
vote
0
answers
12
views
Unity: 2D Background crashes and shows last frame
ive build my first mobile game with unity and everything worked fine in the engine but after building and installing it on my phone I get a weird bug. Basically the background of the start menu will ...
0
votes
0
answers
27
views
How to fetch and display just the count of grep matches against each file that has the matching string?
cat Samplescript
for OUTPUT in $(grep -lR "Sample sv15 Processor" ./*) #List files with matching string
do
grep "Sample sv15 Processor" $OUTPUT | wc -l
done
My approach is to ...
0
votes
1
answer
77
views
jq command to add onto a map
Is there a command to use jq to add onto this type of map?
append an array of maps using keys (ie, vm1, vm2, vm3)
Note: I have an existing vm_map {} in a json file and i want to add to the vm_map
this ...
-3
votes
0
answers
23
views
Shell script to transfer a file from SCP [closed]
I need to transfer a file from one sftp server to another using shell script from SCP. The username local dir and remote dir need to be hard coded in the script file. Kindly suggest solution. A ...
0
votes
3
answers
66
views
Implement tr and sed functions in awk
I need to process a text file - a big CSV - to correct format in it. This CSV has a field which contains XML data, formatted to be human readable: break up into multiple lines and indentation with ...
0
votes
1
answer
55
views
Wrong exit code returned when script is piped [closed]
I would like to understand why the following returns exit code 1
$ set -o pipefail
$ bash -eo pipefail -lc 'while [ 1 ]; do exit; done' | tee asd
$ echo $?
1
even though bash -eo pipefail -lc 'while [...
0
votes
1
answer
22
views
How to suppress printing variable name while printing its value in sqlplus?
I am trying to achieve this.
This is my code
var cvar varchar2(20)
exec :cvar := 'variable value'
print cvar
This is the current output
PL/SQL procedure successfully completed.
CVAR
---------------...
0
votes
1
answer
26
views
cut: option requires an argument -- 'f'
I'm using a script to create tables and insert data into the tables but my script has a few errors.
I've been searching online but, no luck, here are the errors:
ERROR 1366 (22007) at line 1: ...
0
votes
0
answers
30
views
I'm making a game on Roblox and when the player resets but owns multiple of the same item instead of all the duplicates saving only one of them saves
My goal is wanting the duplicate items to save when the player resets
For example, if the player owns three "Gun As" then resets instead of still having three Gun As in their inventory they ...
0
votes
2
answers
37
views
Trying to save list data to reuse while testing python scripts
I have a python script that goes out and pulls a huge chunk of JSON data and then iterates it to build 2 lists
# Get all price data
response = c.get_price_history_every_minute(symbol)
# Build prices ...
-1
votes
0
answers
25
views
Store output of a command in bash [duplicate]
Im encrypting the dob form a .cvs file and adding it into mongodb collection.
When i create the new variable it just prints into the terminal and gives me an error like this
script: line 8: ...
0
votes
0
answers
12
views
Google script help - find row containing a col value and b value and then amend col c when submit
relatively new to google script
Looking for script help to achieve the below.Updating record.
2 sheets.
Sheet 1
Overview. Basically a dashboard pulling info from other sheets, I have a row of 3 values ...
0
votes
1
answer
23
views
Call CSV Data and Startup VM's depending on State
I am very new to Powershell and I am wanting to write a script that will check the status of Virtual Machines i.e running or stopped, then when the host machine reboots depending on the status of the ...
0
votes
0
answers
35
views
Scripting frame-by-frame
I am a complete noob at scripting and video capturing, so I'm wondering if it's possible to write a script in python with OpenCV for example such that when I press a hotkey, there is another input on ...
-1
votes
0
answers
20
views
after waiting for 60seconds , how to Read Bubble ScreenSaver feature status and verify Photos in windows using python
def enableScreenSaver(self):
argument = [
"Reg add",
'"HKEY_CURRENT_USER\Control Panel\Desktop"',
r"/v",
"...
0
votes
0
answers
22
views
Piping not working inside powershell script
I am trying to automate the restart process of some applications with the help of PowerShell.
Basically, my main goal is to execute this line within the script:
'passwordOfCommand' | .\mycommand ...
0
votes
3
answers
50
views
awk, sed, for in bash: Print "Hello" + Name [duplicate]
I have a list.csv with the following content:
"date";"Mr. Green Tree"
"date";"Mr. Red Apple"
"date";"Mr. Blue Car"
I use awk + sed to get ...
1
vote
0
answers
28
views
How to declare a multidimensional 2D array in Powershell? [duplicate]
I am learning about Powershell and all its many flaws. I will be passing in some parameters from the command line, and using them to make a 2-D array of that size. After reading several websites, I ...
0
votes
0
answers
14
views
I am new to shell scripting in Linux, what is the meaning of a=$a $b [duplicate]
I am new to shell scripting in Linux, what is the meaning of a=$a $b. I don't see any info from google
0
votes
1
answer
43
views
How to prevent multiple instances of the same PowerShell 7 script?
Context
On a build server, a PowerShell 7 script script.ps1 will be started and will be running in the background in the remote computer.
What I want
A safenet to ensure that at most 1 instance of the ...
-3
votes
0
answers
18
views
Pre filled google forms with answers from message [closed]
Can I do an automatic fill-up for an input field in a google form? The user will get a message to submit the form. And every message has a unique order id. So I want to put that id in the form's input ...
0
votes
0
answers
9
views
Use Inkscape actions to inject <metadata> XML fragment into SVG
I'd like to add my own custom set of "Dublin Core" RDF-metadata attributes into SVG files which I then want to embed into web pages. I edit my SVGs with Inkscape usually save it as "...
0
votes
0
answers
19
views
Excel scripting for sending commands on PuTTy
I want to make this script making "if", "else" choises and according on the output then to send different commands.
For example
Private Sub Worksheet_BeforeDoubleClick(ByVal Target ...
0
votes
1
answer
27
views
Encrypt Azure Storage account key in powershell script
I'm developing a new powershell script in order to download any blobs from a specific container and the problem is due to security reasons because I do not want to paste in text plain the azure ...
-1
votes
1
answer
32
views
how to use bash output as variable [duplicate]
I am creating a job that would first initiate an API checking what is the next available ip in a subnet with some parameters.
Then i want to run "ping" check on the output (that is an IP), ...
-2
votes
0
answers
21
views
Initiate SAP connection from VBA [closed]
I have a question for you. Do you have a way to initiate a SAP connection from vba in case there is no SAP instance active?
Thank you
Christian
0
votes
0
answers
30
views
make[1]: [Makefile:275: list] Error 2 (ignored) && sort: cannot read: tmp: No such file or directory
Hi I was running HTS Software
I'm using the Makefile, and it has an error like this
sort: cannot read: tmp: No such file or directory
make[1]: [Makefile:275: list] Error 2 (ignored)
I'm not sure if &...
0
votes
0
answers
28
views
How to compare column1 from Df1 to column1 of different tables using Python(pandas)?
How to compare column1 from Df1 to column1 of different tables using Python(pandas)
Df1 contains the result of sql statement (select * from emp_table)
Df2 contains the result of sql statement (select *...
0
votes
1
answer
26
views
python script call another script with dataframes as arguments and return a new dataframe
I need to make a script in python that calls a lists of scripts that I have stored in a dictionary this way:
TestsDictionary = {
"Test_1": 1,
"Test_2": 0,
...
-2
votes
1
answer
16
views
SQL Max or empty value grouped by conditions
I have a table like this
and i want my output to look like this
I need to look at the ID and then take max created date and max completed date for that ID. There is also some cases where completed ...
0
votes
0
answers
22
views
Not getting any error log in Windows PowerShell while installing MSU
While I am trying to install MSU manually in the windows 2019 server, I am getting one error like
"The update is not applicable to your computer". Because some alternative KB has been ...
0
votes
0
answers
14
views
mailx - sending zip files
I have a zip file named : zip_final.zip
I have to attach this file as a attachment and send the mail.
Also, I have to display all the file_names present inside the zip file in the mail body.
I have ...
0
votes
0
answers
13
views
How to save the Hash of the output of a command as a variable? [duplicate]
Where the output of this command:
"grub-mkpasswd-pbkdf2" asks for input (password) & then,
Outputs the Hash of that password into the terminal.
How do I save the output (hash) into a ...
0
votes
1
answer
37
views
How to resolve a shell script variable in a Jenkins Pipeline script, while using sed? [duplicate]
I have jenkins pipeline script, in which I am using sh to perform some bash commands.
sh """
#!/bin/bash
# some work that needs groovy variable access (env vars)
some_var='5' # for ...
0
votes
0
answers
17
views
Select whole words when mouse hovers over- Autohotkey
If the cursor is of the IBeam type and the F20 key is pressed and dragged, the text is selected with the shortcut Ctrl + Shift + right (or in the direction to which it is moved) .
Is there any way of ...
-1
votes
0
answers
18
views
WinSCP Script for daily FTP
I have been stuck on this issue for a little bit and I was hoping someone here might be able to help.
My goal is to transfer files from an email to a directory daily, only uploading new and changed ...
0
votes
1
answer
40
views
PowerShell - Using portuguese characters in the name of folders
I'm writing a script that moves a lot of folders from a source to destination path. The thing is that not every folder should go to the same directory. So I have .txt files with a list of folder names ...
1
vote
2
answers
44
views
searching for character occueances in a line within a file in Linux and editing it
I have a delimited fields file that I want to load into the database in Linux. The thing is that the number of delimited fields is not the same in every row. So, I need a shell script to iterate over ...
0
votes
0
answers
66
views
Need to extract the user that meet the criteria spanning over three lines in log file by bash [closed]
I am writing the code to extract a user that meet three critera in the log file. The first criteria is the timestamp have to be of same timestamp in order to parse the rest of the lines to get the ...