Getting ssh to execute a command in the background on target machine

This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get...

C Shell: How to execute a program with non-command line arguments?

My $SHELL is tcsh. I want to run a C shell script that will call a program many times with some arguments changed each time. The program I need to call is in Fortran. I do not want to edit it. The...

How to determine the current shell I'm working on

How can I determine the current shell I am working on? Would the output of the ps command alone be sufficient? How can this be done in different flavors of Unix?

Why does perlbrew fail while installing perl-5.12.2?

When I try to install Perl 5.12.2 with perlbrew, I get an error at the end because the CPANPLUS tests fail. Making utilities make[1]: Entering directory...

Reliable way for a Bash script to get the full path to itself

I have a Bash script that needs to know its full path. I'm trying to find a broadly-compatible way of doing that without ending up with relative or funky-looking paths. I only need to support...

Does Csh have an autocomplete setting that deal better with case?

I have auto complete turned on in my .cshrc: set autolist set correct=cmd set complete=enhance works pretty nicely, except when it comes to case. I have a directory that contains...

Make a Bash alias that takes a parameter?

I used to use CShell ([tag:csh]), which lets you make an alias that takes a parameter. The notation was something like alias junk="mv \\!* ~/.Trash" In Bash, this does not seem to work. Given...

What is a good way to deploy a Java program and give JVM arguments?

Currently I have been deploying my application as a .jar file, because users of every OS can just double click it. However I now need to increase the max heap size, and the only way to do that is...

shell-script headers (#!/bin/sh vs #!/bin/csh)

Why do all script files start with #!/bin/sh or with #!/bin/csh Is that required? What's the purpose of this? And what's the difference between the two?

redirect sql query results to a .log file

I have a c-shell scrip that connects to a mysql database database through and invokes a sql script which in turn invokes another sql script to run a query and return a report #!/bin/csh set...

using grep in if statment in unix

I am a newbie in UNIX I am trying to write a script that will grep on a certain word and print the line and file where it was found if its available and echo not available if it wasn't found here...

What is the difference between bin/sh, bin/bash, sbin/nologin, bin/tcsh, etc?

I am new to linux so please go easy and talk slow =) In Plesk I have some options for accessing the server over SSH. I just want to connect, add my public key and run rsync for backup. What is...

How to replace a path with another path in sed?

I have a csh script (although I can change languages if it has any relevance) where I have to: sed s/AAA/BBB/ file The problem is that AAA and BBB are paths, and so contain '/'. AAA is fixed, so...

csh startup scripts

I know that csh has a lot of start-up files (.login, .cshrc, etc.). The problem is that I'm starting a new csh terminal and I'm seeing a lot of non-standard (not the standard ones like $HOME,...

How to make exit behave when "sourced" in csh

csh is an utterly horrible shell. (Making that statement up front to avoid the inevitable comments of "don't use csh", or perhaps I should just state that for the sake of any readers: please, if...

grep from file, print matched and unmatched

I have a file, say input, containing patterns like below: quantum_mech_.* astrophysics_.* geology_.* economy_* I have another file , say subjects, which looks...

how to change shell on amazon EC2 linux instance

I installed c shell using the sudo yum install tcsh command on my brand new amazon EC2 instance, but I'm not sure if it's actually working, since the echo $SHELL command always returns /bin/bash....

Unix - Csh: How to load new shell with clear environment?

I have a csh shell that is "dirty" with a lot of modifications in PATH, in LD_LIBRARY_PATH and in more environment variables. I want to load a "clean" csh shell that will not "inherit" all the...

How to loop script till user input is empty?

I am trying to make my script to repeat till the user leaves the block question empty. I just got the loop to run, but I can not find a way to make it possible to stop it when block is empty. I...

How can I change my tcsh prompt to show my current working directory?

I am using tcshand I am looking for a way responsive working directory where I at least want to display the last folder name instead of getting full path. Imagine my current working directory is...

Set variable on the same line as command

In sh programming I can do this: dryrun="echo " ./myscript.sh And script uses it as: ${dryrun}ls -l (as an example) I can't seem to figure out how to call script in csh with the same effect.

How to xmlstarlet on multiple files and append the output?

I am using CSH Shell. My Current Working xmlstarlet command (does an xmlstarlet operation on a single file and the result is pasted in an output text file): xmlstarlet sel -t -m '//RESULT_STEP' -v...

While loop in shell script not working in the linux bash shell

Am kind of newbie in writing shell scripts in linux. Its a csh script but am running it in the bash shell that why I used #!/bin/bash instead of #!/bin/csh. 1 #!/bin/bash 2 set i = 1 3 echo...

Python subprocess.Popen() not running command

I'm trying to use subprocess.Popen() to run a command in my script. The code is: output = Popen(["hrun DAR_MeasLogDump " + log_file_name], stdout=subprocess.PIPE, stderr = subprocess.PIPE,...

Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<<

While installing weblogic server, I am getting this error. I have tried pretty much but I couldn't sort it out. I tried by this below commands, # xhost + yum install xorg-x11-xauth And I followed...

Is it possible to install SpaCy to Raspberry Pi 4 Raspbian Buster

I have been stuck at installing SpaCy the entire day. sudo pip install -U spacy Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting spacy Using cached...

Trouble with step in setting up virtualenvwrapper for Python

I'm trying to complete the section Managing Virtual Environments With virtualenvwrapper here. I'm up to this section: Once it’s installed, we’ll need to activate its shell functions. We can...

How to get conda activate to work with csh?

I installed anaconda distribution. The conda activate someEnv name is not working. I get the error CommandNotFoundError: Your shell has not been properly configured to use 'conda activate`. To...

Make terminal cursor blink

I can't find the option in man page to adjust cursor settings like: shape, blink, blink rate, color, etc. I know how to edit the .cshrc file to customize the prompt like adding/removing username,...

Using GNU parallel command with gfind to gain in runtime for gupdatedb tool

I make follow to the previous post combine parallel and gfind I would like to build the gupdatedb database, containing all from main root / excepted the PRUNEPATHSlisted more below. I am working...

Relevant tags