Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shell-script]

A shell script is a script written for the shell, or command line interpreter, of an operating system.

0
votes
1answer
30 views

Can I simplify and negate this? ^(//|//\s+|\s+//|\s+//\s+)

Basically I want to match commented lines like: // foobar (this is a commented line) but I want to make sure I catch this line even if there is white space either side of the comment signature '//' ...
0
votes
1answer
29 views

Shell: How to create a user with the same password with another user?

Linux has a user, root. It has a password, unknown to the shell script. No human can input anything for the script. The script wants to create a user, user001, with the same password with root. ...
0
votes
0answers
16 views

Searching through txt, pdf, and doc files for Mac and Linux platforms [closed]

I have to search in all files in my pc quickly.How can I do that? The grep command doesnt work for doc or docx files.Can someone help me ?
0
votes
0answers
16 views

Check if similar sentence repeated twice in a line

I want remove those line in which similar sentence repeated twice in same line for example: Total time [any text between brackets] Recieve Time [10.78.12] Total time [any text between brackets] ...
1
vote
0answers
23 views

How do I merge videos that have overlapping frames into a video without duplicate frames?

I've nvidia highlights that takes 3 minutes recordings when events happen. If two events happen sooner than 3 minutes then those recorded clips have overlapping frames. I want to take all the clips ...
0
votes
3answers
45 views

Temporarily disable files in macOs

Is there a convenient way to temporarily make files 'not found' to the OS (or more specifically, an App)? I was thinking an automator action that just adds '.DISABLED' to the filenames, but automator ...
0
votes
0answers
18 views

How to edit script to run on all files within directory?

How to make this script run on all video files within directory executed? #!/bin/bash # Fade OUT, TO BLACK: # length of the fade out fade_duration=2 # seconds if [[ ! $2 ]]; then cat<<...
0
votes
0answers
26 views

Continuously detect a change of chksum of files under folder with inotify-tools

I just installed inotify-tools. I would like to continuously detect change of chksum of files under folder /path Once a change was detect ( under /path ) then it will print echo “chksum of files ...
0
votes
0answers
13 views

kMDItemFSCreationDate is acting like modified date instead of creation date

I cobbled together a shell command that would reveal the newest file added to my system. open -R "$(mdfind -onlyin $HOME 'kMDItemFSCreationDate >= $time.now(-7000) && kMDItemContentType !=...
0
votes
0answers
9 views

how to fetch the mpeg stream from local URL/ COM port using shell commands in unix based(raspberry) system?

I am looking for a suggestion through which I can try fetching some mpeg stream at very low frame rates from the local IP/COM port and transport it whole into other system with the help of an ...
0
votes
0answers
37 views

Raspbian: bash script running fine in terminal window, but not when added to autostart

I use a script to start the google voice assistant on my rpi. This script runs fine when I run it from a terminal window, but when I try to run it via the LXDE autostartup nothing happens. It used to ...
0
votes
0answers
13 views

How to download only particular folder files of sub-folders from FTP site in command line in linux

I had tried using this command "wget -r ftp://ftptrace.ncbi.nlm.nih.gov/giab/ftp/data/AshkenazimTrio/HG004_NA24143_mother/NIST_HiSeq_HG004_Homogeneity14572558/HG004_HiSeq300x_fastq/...
0
votes
0answers
21 views

Configure time consuming Shell script execution before shutdown linux instance

I am looking for the solution to configure a shell script which will successfully execute when linux instance is shutdown. but there is a challenge, I required network to execute my shell script also ...
0
votes
0answers
15 views

sh(conf) script can not run php file

I am trying to run a php script within my fail2ban action file. When I disable selinux everything works fine, but when I enabled it again I get a constant error in my fail2ban log. php.conf (action) ...
0
votes
2answers
39 views

Run shell script even in sleep mode?

I want to create a script that logs the battery level and CPU load on a laptop, however I still want to log the battery level whilst in sleep mode. Is there any way to do this in Linux? OS: LM 18.04 ...

15 30 50 per page