Bash is a free shell for Unix-like operating systems from the GNU Project.

0
votes
1answer
18 views

running a script as service that requires DISPLAY=:1 command

I am running Ubuntu 16.04 and Xfce desktop + vncserver to access it I have a script that launches and controls a GUI appI can launch it from a shell like DISPLAY=:1 /home/script.sh I executes my app ...
-1
votes
0answers
13 views

Convert file to PDF using LibreOffice using under apache (i.e. when using JSP) [migrated]

I am converting my docx file to PDF using JSP. The Libre office is not converting file through JSP. But when i am converting it through terminal or bash file, it is converting successfully.Please ...
-2
votes
0answers
44 views

BASH SCRIPT for complete data [on hold]

Hello i was search but i no found noting about copy inside the same file.I have this CSV file."ID";"Comb ID";"Price";"Comb Price";"Name";"Descr""3";"";"200";"0";"name1";"Desc some""4";"21";"";"...
0
votes
1answer
64 views

Large Data Processing: Removing lines in one text document found in another

I have 2 large text files (~500M, ~15GB ea) That look like this: FileP.txt:test@test.com:testtest test@test.com1:testtest1test@test.com2:testtest2test@test.com3:testtest3test@test.com4:...
-1
votes
2answers
43 views

Append console out to file at begin [duplicate]

To postgenerate fake-module-bpy (For blender Python)... нowever, the language does not matter.So, I use next console command]$ ls | grep -v _init_ | sed -E 's/^([a-zA-Z0-1]+)/import \1/' >> ...
0
votes
1answer
24 views

Use asterisk sign in env variables value

I need to define an environment variable with a value of a cron job.The value would be as the following:"0 0 * * * *"It will be executed as a bash command on linux.Is It possible?How could I ...
0
votes
0answers
25 views

how make multiple redirection with command and fifo

I need to write a bash script in a linux machine with the follow redirection.echo commands > cmd_receives_commands > fifo > awk_parser > tcp_socketI verified that for the "tcp_socket" ...
1
vote
0answers
20 views

Git/Linux - Pushing trough ssh on a Lan server(raspberry pi) not showing any errors

I am setting a Git server on my Raspberry pi 3 running Rasbian Lite.The 22 port is open and i can successfully ssh into it. On the client side i can git clone from the respositorry,the files are ...
1
vote
0answers
17 views

stop bash try to display every possible result and auto-complete when ambiguous result find

This is my .inputrc9 set show-all-if-unmodified on10 set menu-complete-display-prefix on11 #set completion-ignore-case on12 set disable-completion on1) How do I stop bash try to display ...
0
votes
3answers
71 views

MD5 the files in each subdirectory given a starting directory, placing the checksum file in the subdirectory

What flags do I need to give to the find command to enter the directory before running the -exec command?I have a directory filled with directories filled with files> root directory-> ...
0
votes
1answer
39 views

Is it faster to use WSL commands instead of cmd commands for file manipulation?

On Windows 10, it is possible to manipulate files through the command line via three separate built-in ways: Powershell,the command prompt, and throughbash commands via the WSL (Windows Subsystem ...
1
vote
2answers
29 views

How to specify executable python path?

My PATH variable looks like this:/home/elgin/anaconda3/bin:…:/usr/bin:…As you see above anaconda3 precedes /usr/bin. So when I type python in terminal, it gets python in the first anaconda3 path....
0
votes
0answers
19 views

What is the easiest and shortest way to know java installation folder in bash?

The only way i know right now is-echo $(/usr/libexec/java_home)I tried editing .bash_profile to add export JAVA_HOME=/usr/libexec/java_home but still it didnt do the trick, so any other ...
-1
votes
0answers
32 views

How to copy admin protected user-1 data to user-2 or to an external pendrive in LinuxMint18.3? [on hold]

How to copy or backup user1 data which is password protected to user-2(login access available) or to a pendrive in linux? I tried to change the password but didn't work due to some bash script issue...
0
votes
1answer
13 views

“Command 'soruce' not found” when trying to execute bashrc (not a typo)

When I try any of the following I always get the above errorsudo bashsource ~/.bashrcsudo -sEven if I'm explicitly using the 'source' command it seems to think I'm typing in 'soruce' instead. ...
-1
votes
2answers
48 views

Can you make Windows command prompt cmd+cygwin?

I want to make my windows command prompt cmd+cygwin. I should be able to run both windows cmd commands and cygwin commands from my windows cmd prompt. If I add C:\cygwin64\bin to my PATH variable i ...
0
votes
1answer
15 views

Recursively execute Linux 'ar' command

I have a directory with hundreds of sub-directories with many .lib files in them. I am able to use the ar -x filename.lib command to unpack one of them, but I was wondering how one would do this ...
0
votes
0answers
31 views

SSH : “Connection reset” for one of my LXC's

I've been stuck for a while about my ssh connection to one of my LXC's.Indeed, when I connect in ssh to my other LXC, everything works.However, one does not want to connect and displays this error:...
0
votes
2answers
70 views

Moving files with extension from source to destination

Hello i am trying to move all files with .hi and .o extension from a target folder /src to another folder /ObjSo far i have tried:srcpath=$(pwd)"/src"ghc src/Main.hs > Logs/output....
0
votes
0answers
8 views

Is it possible to use Automator to print a new page from where it left of?

Sorry if the title is not clear. To give you a real life example, my printer stops working if I print more than 20 pages. And I have a 400 pdf file I would like to get it printed using Automator....
0
votes
0answers
20 views

cmder ssh connect in new console not run default bash

I am trying to ssh connect using cygwin bash in cmder. I set cygwin bash as default bash under Settings>Startup>Specified named task - I put here Cygwin bash.When I open cmder - cygwin bash is ...
3
votes
1answer
47 views

Remove all but N files from directory recursively

I would like to whittle down a large database from the command line to N files, very similar to this question does. The only difference is that most of my files are in sub-directories, so I was ...
0
votes
2answers
31 views

Mac terminal isn't recognizing wild card

I'm trying to write a script that shrinks all the images in a folder.From here I got this:for i in *.png; do sips -Z 800 "${i}" --out "${i%png}"; donebut I keep getting this error:Warning: *....
-1
votes
0answers
29 views

Get size of multiple directories from multiple location on Linux [closed]

I have client directories under a parent folder like below/home/test/one/client1/home/test/one/client2/home/test/one/client3/home/test/two/client2/home/test/two/client10/home/test/two/client55...
0
votes
2answers
95 views

Bash vi mode: simulating Enter in binding

I have a function fh() in my .bashrc. I want to bind Ctrl-F in vi-insert-mode to run this function.I have triedbind '"\C-F":"fh\n"'This types fh into my terminal and tries to autocomplete the ...
1
vote
1answer
24 views

Unix/Linux - service unit file cannot recognize env variable set in /etc/environment

I have an environment variable setup correctly in /etc/environmentI have ensured that it loads correctly via /etc/profile modification. and I can echo it to confirm.but when I created the unit ...
1
vote
2answers
33 views

Windows-to-Linux: Execute a shell script as user process (as bkgrnd) on remote machines

I am trying to do the following:1) Run a shell script on remote machine 1,2,and 3 (all Linux) from Windows machine.2) On my Windows machine I have plink which I am using in the following way:...
0
votes
1answer
25 views

Find files based on siblings

Consider this directory:thingsToThinkAbout/thing1.txtthing2.txtthing2.txt.thoughts.txtthing3.txtthing7.txt.thoughts.txtWith bash find I can look for the things (find . -...
3
votes
1answer
43 views

Bash Auto-completion with Tab button doesn't complete at some condition

We know some commands doesn't work on some files/directories. As an example we cannot use "cd" command on a file and when we try to press tab button to complete our line, the system doesn't show us ...
0
votes
0answers
27 views

Batch renaming of files according to a separate ID file

I am working with Ubuntu 16 and I have a directory with hundreds of files with unique filenames.I would like to batch rename them according to a separate ID file.For example:Original directory ...
0
votes
1answer
27 views

Saving outputs (some lines in a file)

I use this command:http://superuser.com/nodetool statusDatacenter: datacenter1=======================Status=Up/Down|/ State=Normal/Leaving/Joining/Moving-- Address Load Tokens Owns Host ID ...
-1
votes
2answers
93 views

Tar with progress but without compression

There are a lot of answers on how to create a tar.gz file with progress updates (ie. this answer, copied below)tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{...
0
votes
0answers
17 views

Processes started with cron are being killed sometimes

Running in a GoDaddy Shared hosting environment I have a few cron jobs. One of them ib being killed sometimes and i get email notifications when this happens in a form like:/bin/bash: line 1: ...
0
votes
0answers
8 views

QSUB hang on one user in X option

I'm using PBS for distributing jobs on a cluster. Normally I can start the X11 interactive mode in a node by:qsub -I -X -l select=1:vnode=gpunode1but it doesn't work for a new user. It just hangs ...
0
votes
0answers
28 views

Run a command if a terminal tab is idle

I always have multiple Terminal tabs open, each with a different purpose. I want to remind myself what that purpose is by echoing something (stored in a variable) whenever that tab becomes idle. (By ...
-1
votes
0answers
1k views

Creating multiple Nagios GUI users via script that uses REST API

I need to create a lot of Nagios logins for the Nagios XI GUI and would like to use the API that Nagios provides to create a script that would allow me to bulk add up to 500 users.These are the ...
0
votes
2answers
31 views

Sorting files numerically, including negative numbers

I have a bunch of files:adenine-N1_B+1,70_A+0,00.pdbadenine-N1_B+1,70_A-10,00.pdbadenine-N1_B+1,70_A+10,00.pdbadenine-N1_B+1,70_A-15,00.pdbadenine-N1_B+1,70_A+15,00.pdbadenine-N1_B+1,70_A-20,00....
0
votes
1answer
17 views

shell command on matching line (in vim: combine the global `:g` or `:v` command with shell command)

I want to use a shell command (fmt in this case) to operate on every (non-)matching line of a regex in a file. I'd prefer to do it within vim! I am, nonetheless, open for a pure shell/bash/zsh ...
0
votes
1answer
72 views

Mac Automator using FFMPEG to generate thumbnails with shell script

I've added the following to the Run Shell Script Objectfor f in "$@"do/usr/local/bin/ffmpeg -y -ss 3 -i "$f" -v quiet -vf select="eq(pict_type\,I)" -vframes 1 "$f.png"donethe ffmpeg line works ...
0
votes
1answer
56 views

Trigger file copy upon device insertion (without depending on systemd)

I would like to automatically have some files form a storage device copied upon its insertion. I am looking to use one and the same method on both systems which use systemd and systems using init ...
0
votes
1answer
33 views

Bash modifying text between marked lines

I have a file with more than 8000 rows. File is divided into sections, each section is labeled with text like ##C, ##T,##N. I have to modify some rows in the file. I used command SED to mark lines ...
0
votes
0answers
18 views

How to connect to IKEv2 VPN server using command line in Ubuntu?

How can I connect a Ubuntu 16.04 machine to a IKEv2 VPN server using just command line. Since this is a remote machine, I cannot use any GUI. I am given:The hostname of the servermy username...
2
votes
1answer
26 views

Shell pipes - the order of things

Because netcat on my box doesn't support -e,The netcat man page gives me this workaround:$ rm -f /tmp/f; mkfifo /tmp/f$ cat /tmp/f | /bin/sh -i 2>&1 | nc -l 127.0.0.1 1234 > /tmp/fI ...
0
votes
2answers
12 views

Cut region out of bash input

Say that you have entered the following command into your terminal emulator:sudo apt-get apple pie install hamsterYou run it and realise your brain fart. You placed the package names apple and pie ...
6
votes
1answer
48 views

Run a script with bash and supply a termination time [duplicate]

Is it possible to run a script from bash (e.g. python) with a termination time, meaning that if this script runs for longer than X seconds, terminate it?
2
votes
1answer
92 views

Why can't my RaspberryPi execute these basic commands as pi?

As it says in the title, my RaspberryPi can't execute some basic commands (e.g. ls, mkdir, su, ...) with the user 'pi'. I always get the following as output:-bash: /home/pi/bin/ls: Cannot execute ...
0
votes
0answers
23 views

Nested while loop (probably not best practice) that I can't figure out

This script takes a file as an argument. It then prompts the user to input how many lines of that file they want read out...and then it is supposed to read out that many lines:#!/bin/bashread -p "...
5
votes
2answers
277 views

What does “>> file command” do, and how does it differ from “command >> file”?

Picking up from this highly voted comment to What does `>>` mean in terminal command?:"program before" What does that mean? Command obviously, but redirections can also be written prepended, ...
0
votes
1answer
22 views

Can access directories using ls but not from Bash

I have a bunch of undisciplined users with mail accounts on a server of mine. They never empty their trash or junk folders and the number of files rise to infinity.I am creating a Bash script to ...
0
votes
0answers
60 views

Where is my `logger` output going?

I have the below function. When I call it, stdout only shows the echo statements. Obviously the function is being called successfully. Why aren't the arguments being read to stdout, stderr or any log ...

153050per page