Questions tagged [script]

An automated series of instructions carried out in a specific order, such as a Windows script created to launch a specific program on startup.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Create desktop shortcut for Safari to a specific web - on MacOS

I'm trying to create a desktop shortcut for Safari that will lead to a specific website when the users will use it. Trying for hours but with no success. Can someone help please? Thanks
user avatar
  • 1
0 votes
1 answer
27 views

How can I record all customization and settings done at Windows? [closed]

This is for domestic need where I have a few computers and few users. I want to make my own script so I do not have to repeat doing settings and customization every time I do a new installation or add ...
user avatar
-2 votes
1 answer
35 views

Looking for a PowerShell or other script/batch file that will replicate a video file over and over to fill an entire hard drive [closed]

Looking for a PowerShell or other script/batch file that will replicate a video file over and over to fill an entire hard drive. Is this possible? Every sector. Basically like a killdisk but instead ...
user avatar
-2 votes
0 answers
26 views

gnome-terminal in shell script

In a script, I want to launch a number of Gnome Terminal windows, and then proceed with the script only when the windows are closed. I have a shell script containing: command 1 gnome-terminal ./script ...
user avatar
0 votes
1 answer
26 views

Restart powershell script

My script counts the audio files on the PC and checks if the drive entered in the input is the system drive. If it is, a message is sent to Return or Exit the script. I created the :INI and :EXIT ...
user avatar
  • 375
0 votes
3 answers
44 views

Batch Rename Files by Switching Two Parts of the Name

I'm new here and don't have any coding knowledge or experience or software, but I use Windows 10. I have LOTS of files named like:(1) 2020-03-12.mp3(7) 2021-04-10.mp4(6) 2022-08-25.docxetc.They're mp4,...
user avatar
0 votes
0 answers
22 views

when computer restarts, autorun ubuntu terminal with four commands

I want to automate my linux Ubuntu 22.04 terminal commands on startup (GNOME terminal version 3.44.0 for GNOME 42). When computer restarts, I want to autoopen terminal and write commands with 5 ...
user avatar
0 votes
0 answers
8 views

transforming ASCII text to camel_case + .-: should I use tr, sed/awk, or perl to be most POSIX?

I've got a variety of ASCII text, in single lines. I would like to: tr '[:upper:]' '[:lower:]' (change to lower-case) tr -s ' ' (squeeze multiple spaces into one) keep existing '_' and '.' characters ...
user avatar
0 votes
0 answers
24 views

Script to copy Exchange Distribution Groups from one user to another

I am hoping to get some help with a script to copy Exchange group permissions from one user to another. I currently have a script that works to copy mailbox permissions from one user to another but ...
user avatar
  • 1
0 votes
0 answers
28 views

Is the macOS/Linux shell the same thing as Bash?

sorry if this is a silly question, but are there any differences between Bash and the macOS/Linux shell? (not all Linux distros use the Bash shell right?)
user avatar
-1 votes
0 answers
28 views

Windows Equivalent to `sha256sum -c` (cryptographic hash, digest file, recursive integrity check, SHA256SUMS)

What is the equivalent to sha256sum -c in Windows? I have a set of very important files that I need to copy-to and mirror across many different types of disks in many geographically distinct locations....
user avatar
0 votes
1 answer
16 views

Escaping quotation marks in a bash script on macOS

I want to turn the following command: $ gdate --date='TZ="America/New_York" 1am' +"%a %F %H:%M %Z" into a script using parameters, such as: #!/usr/bin/env bash gdate --date='TZ=&...
user avatar
0 votes
1 answer
26 views

How can I find out who offered the last interest rate at auction? [closed]

I want to know who else is participating at online auction but the name of the participant who offered the last interest rate is hidden with asterisks. Here's the script code from the source page: ...
user avatar
  • 141
0 votes
0 answers
31 views

How to replace Symlinks with the files they point to on Windows 10?

I am trying to batch replace symlinks in several folders with the original files that they point to. The only solutions I've come across are Linux/Unix/Bash scripts as shown here: Replace Symbolic ...
user avatar
  • 49
0 votes
1 answer
11 views

How do you execute a remote script on a remote host in R

I am trying to figure out how to execute a remote .bat file on a remote host on that host, not on the localhost from R. This syntax: bcpImport <- shell("//remotehost/S$/SnowflakeCSV/...
user avatar
0 votes
1 answer
12 views

How can I extend my displays and make my other monitor the main display with a shell script in windows 10?

Every time i plug in my monitor I need to manually extend the displays and switch the main monitor. I'd like to automate this with a shell script. The display arrangement is the same every time. I ...
user avatar
0 votes
1 answer
30 views

Delete blank pages from PDF does not work

I would like to use this script from this thread: Remove blank pages from PDF from command line. #!/bin/sh IN="$1" filename=$(basename "${IN}") filename="${filename%.*}" ...
user avatar
  • 1
2 votes
1 answer
52 views

How to download a file from multiple Linux machines using WinSCP or batch script?

I need to download a specific file from 40 different Linux machines. How can I achieve using single script? I tried WinSCP.com /script=script.txt Here the limitations is only one session can me make ...
user avatar
  • 21
0 votes
4 answers
43 views

How do I batch delete entire rows that do not end with forward slash in CSV file?

I have a CSV file that is too large because it contains file paths as well as directory paths. I need to modify it so it only shows the directory paths but not the files themselves. I'd like to know ...
user avatar
  • 676
0 votes
1 answer
42 views

Issue rapid, consecutive terminal alerts

I'd like to issue 2-3 rapid, consecutive alerts in an automated script running in the standard terminal app. I am already able to issue a single alert with echo -e '\a'. However, when I try to issue ...
user avatar
0 votes
0 answers
47 views

Run powershell script from anywhere in the PC

Powershell script, on my Desktop screen, that executes commands on files in a certain folder. When I run the script on the desktop, it works, but when I move the script to another location, it doesn't ...
user avatar
  • 375
0 votes
1 answer
34 views

Echo errorlevel description to log file

Forgive me ignorance here. I'm very new to writing batch files. I am copying files from one mapped server drive to a different mapped server drive, and creating a log file after the copy is complete. ...
user avatar
  • 1
0 votes
0 answers
14 views

How do I list OID Names along with their associated OnNotificationAction Triggers with PRTGAPI using Powershell?

So I'm trying to pull a list of Group Names with their corresponding notification triggers using PRTGAPI, Get-Sensor | Get-Trigger gives me ObjectId & OnNotificationAction but I am struggling to ...
user avatar
-2 votes
1 answer
36 views

Symlink that runs a script when accessed (Linux)

I would like to make a symbolic link that refers to a file and runs a script every time it is accessed (specifically one that shows a notification and logs to a file). After a quick search of Google ...
user avatar
0 votes
2 answers
43 views

how to make a batch file to edit specific parameters in another text file

i have a computer that streams on a close network, the stream is controlled by a text config file, i would like to make a bat scripts that goes like: enter your selected IP stream: enter your port: ...
user avatar
  • 1
0 votes
0 answers
28 views

Why does the script work on a Notepad window, but not on an Explorer window and other program windows?

I found some code that works in the notepad, but can't work in the explorer and some other software, how to change it to universal?Or is there some other way, to scroll the number of lines without ...
user avatar
  • 1
1 vote
1 answer
51 views

/bin/sh: TexturePacker: command not found (while zsh works) macOS Monterey

I have a small Adobe Animate extension that uses TexturePacker to pack sprites onto sprite sheets. I've successfully added TexturePacker to $PATH (/Applications/TexturePacker.app/Contents/MacOS) so it ...
user avatar
  • 11
0 votes
2 answers
40 views

bash loop trough variables

if i have a bunch of variables in bash: foo_1="path/1" foo_2="path/2" foo_3="path/3" foo_4="path/4" foo_5="path/5" They all start with foo_. Is there ...
user avatar
  • 65
2 votes
1 answer
34 views

Script to iterate on all utf8-based files and rename them based on content found [closed]

You may skip the following which is a preface that provides some context to what I am trying to do: I have a lot of files which are data points of a Nasa satellite (MERRA-2) of different cities. When ...
user avatar
0 votes
0 answers
14 views

Edit in a remote file using bash script

I want to create a script edit in a remote file (both source and destination are Linux) then close it and save it, any idea how to do it ?
user avatar
1 vote
0 answers
26 views

Error executing script conversion image to metadata block picture

My system is Windows and I installed Cygwin so I can run shell and bash files. I'm having problems running the second script posted here https://superuser.com/questions/169151 by @Biapy and would like ...
user avatar
  • 375
1 vote
1 answer
37 views

Extract/Replace and Convert string in Notepad++

i have a file looking like this: Line 207: ["Mystic Scroll: Shock and Swarm"] = { Line 297: ["Mystic Scroll: Concentrated Solar Beam"] = { Line 474: ["Mystic ...
user avatar
  • 13
0 votes
1 answer
46 views

Backup with all metadata preserved but converting file content into zeros (or empty sparse file)

I want to make backups of a directory, everything the same as original files, only except for file content converting to all zeros (sparse files), and also keep the same file size. So for example, I ...
user avatar
2 votes
2 answers
209 views

Searching files by multiple search patterns in PowerShell

I got this piped command: Get-Childitem -Path E:\Shares\ -Recurse -Filter *Synformulas* | Export-csv -Path E:\result.csv Now it is like that, that I need to search for multiple search terms. I cannot ...
user avatar
  • 21
-1 votes
1 answer
68 views

Remove everything between 2 chars using sed

I am trying to remove a string from and including one char, '_' up to but not including another char, ':'. Everything is on the same line. I have files with different names and numbers, that contain ...
user avatar
0 votes
3 answers
46 views

Using --my_argument `cat some_file` as argument to some command

I'm running a command with options/parameters based on files.  So I cat the files inside the command.  However, when there's nothing in the file, this is problematic. mkbootimg --kernel "$...
user avatar
0 votes
0 answers
17 views

Script to moves the files to the folder with the date name the files were created

I need a script (for NAS Synology) to move a large number of files from the main share folder to folders created with the name of the files creation date (year \ month \ day). This script must be ...
user avatar
  • 1
1 vote
1 answer
80 views

Creating disk image

I cannot understand how to create an image file with desired layout. 4Mb of free space | 32 Mb partition First, I need to create the partition table. The following part works: dd if=/dev/zero of=<...
user avatar
0 votes
1 answer
42 views

Excluding a specific folder's content from deletion

So I have a one-liner for deleting content from multiple folders, but there is 1 folder whos contents I do not want to delete. So if I had folders A, B, C, D, and E, I want to delete all files from ...
user avatar
  • 49
0 votes
1 answer
72 views

Rename files from different to same name with different extension

I have 12 folders with each containing two subfolders: "Images" & "Json". Now each "Images" folder has 10 image files named from 1.png to 10.png and each "Json&...
user avatar
0 votes
1 answer
98 views

How can i set a time limit on set /p in Batch?

I've been trying to find out how to set a time limit on a "set /p" in Batch for like 30 minutes and still couldn't find out how.. set /p example= i want this code to exit if it passes 3 ...
user avatar
1 vote
1 answer
59 views

in batch For loop , echo %%i:~0,5% doesn't work

Why doesn't this command work? How can I correct it? for /F %%i in ('dir c:\logs /A:-D/B') do @echo %%i:~0,5%
user avatar
  • 11
1 vote
1 answer
66 views

Script to handle audio devices

Would there be any way to use a script (any language) to enable one audio device (using id?), and disable two others. After that, then disable one input device. Then a separate script, that would ...
user avatar
0 votes
1 answer
77 views

rename all files within a directory and its subdirectories with batch script

I would like to rename the name and the extension of all files which are located in the a certain directories and its subdirectories to a random combination of 25 alphamuneric signs (letters and ...
user avatar
1 vote
1 answer
38 views

How to define and use global, filenames in a bash script

EDIT: Changed the requirement for dynamically-calculated variable names as I don't strictly need this for my use case, and a solution was provided that works for me. This is probably impossible to do, ...
user avatar
  • 11
0 votes
0 answers
21 views

Pipes and file descriptors within bash scripts

Streaming PI camera video to VLC using the following command from bash prompt works OK: raspivid -o - -t 0 -w 1280 -h 720 -fps 12 | cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8081/}' :demux=...
user avatar
  • 241
0 votes
0 answers
13 views

Run script in remote linux pc and continue execution when closing ssh

I've a python script that must run forever (it's a websocket data collector that put data into a database). The script sometimes write some output to console. What I want to do is to execute the ...
user avatar
  • 475
0 votes
0 answers
16 views

Is there a way to Allow/Disallow a specific Process with a shortcut on the desktop?

I have a small problem with a process ramping up my cpu to 100% once it starts. The process is neccesary to start for a function to work properly but once it has started, the process can be killed/...
user avatar
0 votes
0 answers
25 views

send an email to 300 addresses of a list where only the name is differnt

I have an excel workbook that has three columns: Name Last Name Email Address Peter Schmitt peter.schmitt@company.de I need to send an email with some text but with the personal Name of the ...
user avatar
  • 94
0 votes
1 answer
67 views

How and Where to use Line Break in PS ISE

I have a script that I will post down below, and the console feedback is kind of ugly, which I will also post below the script. I am wondering HOW and WHERE do I put a line break to ensure the console ...
user avatar
  • 49

1
2 3 4 5
52