Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

New answers tagged

0 votes

Create a bash script to crawl subdirectories and perform a command with ffmpeg

You can read the subfolders into an array using the tree command, then loop through that array: readarray -t yourarrayname < <(tree -a -d -f -i --noreport yourparentfolder) ...
Shakesbeer's user avatar
1 vote
Accepted

Recurring movement of complete files

You can use a utility such as fuser or lsof to find whether a process is writing to the file. This is only useful if the files are extracted by a process on the same host, and if that process ...
Reinier Post's user avatar
0 votes

I can't find VSCode in unity external script editor browser

Finally figured it out. In my case I installed Unity Hub through the PopOs "Pop Shop" / package manager - Big mistake!!!! It does it in a way where any unity install refuses to locate visual ...
BjarkeCK's user avatar
  • 101
-1 votes

How to execute scripts from a samba drive (cifs mounted)?

It's been my observation that windows (XP at lease) has something called the archive bit which is on when a file is modified. It can be turned off and some backup programs sweep through turning off ...
user628388's user avatar
0 votes

Bash Shell Scripts: Although apt-get update Failed, The Exit Status Is 0, Writing Automatic Update Scripts With Utilizing Exit Staus

Why does apt-get update return 0, I want to get other numbers rather than 0 when the command fails though? apt considers transient network errors as warnings (not errors) which do not cause a non-...
adsr's user avatar
  • 1
0 votes

How to run a shell script in background?

In case you want to keep the log of the command and view with tail with process detached form shell: TEMP_LOG_FILE=/home/user_name/my_log.log > "$TEMP_LOG_FILE" for command nohup ./...
Rajat Verma's user avatar
0 votes

I in linux system I geting many same exported path variable

Read 6.2 Bash Startup Files look in /etc/profile and any file that it sources (using source or . commands).
glenn jackman's user avatar
1 vote

Is there an easy way to install Session messenger on Ubuntu/Whonix

The proper approach and steps should be this for Ubuntu, which downloads the gpg key then refers to that for the signature: Download the key to a keyring folder in /etc/apt/keyrings (also creates the ...
Thomas Ward's user avatar
  • 75.4k
5 votes

Is there a way to know if a file was copied?

By comparing files' contents If a file is successfully newly copied to a different filename, the the contents of both files should be identical ... and given that those script files are unlikely to ...
Raffa's user avatar
  • 32.7k
3 votes

Getting Error in shell script "unexpected EOF while looking for matching `''"

$[ ... ] is a deprecated bash syntax for arithmetic expansion. From man bash: Arithmetic Expansion Arithmetic expansion allows the evaluation of an arithmetic expression and the substitution ...
steeldriver's user avatar
1 vote

My shell script wont run, what did i do wrong?

#!bin/bash Needs to have the full path to bash, To be correct and "working" it needs to be #!/bin/bash (note the missing initial /) Awk -F" " '{print $1, $2, $5, $6}' ...
Hannu's user avatar
  • 5,574
6 votes

Are there limitation to how i can effect a terminal window title

Now the OP has a lot of things going on in his PS1, below I have removed the major portion of it, to create as simple text as possible - with a solution to the actual problem. Using a bash FUNCTION ...
Hannu's user avatar
  • 5,574
9 votes
Accepted

Is there a way to use tee with the whole script from INSIDE the script?

You can put this line at the top of your script: exec &> >(tee -a "update.out") For example: #!/usr/bin/env bash exec &> >(tee -a "update.out") echo "...
bizmutowyszymon's user avatar
7 votes

Is there a way to use tee with the whole script from INSIDE the script?

Note: if you're using a shell other than Bash or Zsh, you may need to replace (in a more portable fashion) |& with 2>&1 | You can wrap the whole script in braces and pipe the output to tee. ...
kos's user avatar
  • 36.9k

Top 50 recent answers are included