Skip to content

How to call user/group IDs in Linux bash scripts

I have this bash script. I run it with the following command: sudo ./install.sh Calling the user core as 500 and root as 0 not working. I’ve got the following error: The reason why I want to use user or group numbers, because I want to make it multiplatform (would be nice if it can choose between 500 or…

Shell bash script does not run R

I have an R script that I can run with and it successfully returns the results to a.txt. I am attempting to write a new shell script that plan to run daily, and have made the following script, called morning I run this with the following commands I can get this to work sort of, but end up with the

How to format 2nd and 3rd lines on the first line?

I am using VIM, and I want to format 2nd and 3rd lines. I can do it by :2,3left<number of spaces> How to do it easier to get something like this? Answer try this pres Esc+: then press v then press enter , select the second and third lines , press = https://www.cs.swarthmore.edu/help/vim/reformatting.htm…

Using tee command with soft linked file

I have a script start.sh which runs another script run.sh. run.sh starts my executable. I wanted to record what run.sh does and I used a tee command to log it into a file loglink, start.sh: loglink is a soft linked file. I have a logic where I have 3 log files log1.txt log2.txt log3.txt, I need each file to h…

Browsersync on Linux

I did install Browsersync on Ubuntu using command line: Now, I went to check for version: where I get error message: What should I do now? Answer I got it fixed installing nodejs-legacy: Then checked back to be worked: Thanks to @Biffen for his tip 🙂

Newbie-ish error: cp: omitting directory

Pulling my hair as I’m stuck with a basic error without understanding why: We’re in a “test” directory, in which I created one “del” subdirectory. The “test” directory contains a variety of files of various types. The result is a series of lines (same number as …