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
0answers
7 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
8 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
24 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
11 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/...
-1
votes
0answers
23 views

How to execute command within middle of echo'd sentence in .bashrc?

So, I am trying to show the output of a command located in the middle of a sentence and I am still pretty new to linux because stupid Windows horded my life without letting me ever even know that the ...
0
votes
0answers
17 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
14 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
36 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 ...
0
votes
0answers
19 views

Obexctl: Provide different result in terminal and script

I have created a script where I want to send file over bluetooth. For that I took "obexctl" utility. I can transfer file using obexctl utility over terminal. But when I'm trying to incorporate the ...
0
votes
0answers
10 views

PostgreSQL date-dependent operations

I want to add a function like trigger to my Postgre database. The problem is that this function should executes one time each day automatically and change values in specified table. Is it possible to ...
0
votes
0answers
28 views

Change file association programmatically without ftype/assoc

From batch the pair ftype+assoc works fine: ftype my_file_txt=C:\Windows\notepad.exe "%%1" assoc .txt=my_file_txt But from JScript/CScript/WScript it can't be done because these are virtual commands ...
0
votes
0answers
37 views

Shell script to ssh into 10 servers & check for java process

Shell script - to ssh into 10 remote servers and keep checking for presence of a java process - 'abcd' and the print the PID and return. It should check for 5 min atleast -if no process found. please ...
1
vote
1answer
39 views

How to delete all directories except last 2 directories and the symlink pointed to those directories

I have below directory structure. drwxr-xr-x 5 ec2-user ec2-user 4096 May 22 07:03 TEEST drwxr-xr-x 5 ec2-user ec2-user 4096 May 24 05:33 BEE-TES drwxr-xr-x 5 ec2-user ec2-user 4096 May 24 10:53 ...
0
votes
0answers
57 views

Automator - Render multiple PDF as JPG, each retaining PDF name

I need to render many 10-page PDF documents to JPGs. I can run a workflow to yield sets of JPGs, each retaining the name of the original PDF. The problem is that they are automatically numbered ...
0
votes
1answer
32 views

Rename-LocalUser not available when Intune executes

I have a configuration script that I want to run once during an Autopilot install. I've implemented this using the Device Configuration - Powershell scripts. I've turned on transcript and get this ...

15 30 50 per page