How to change the default shell for the at command


Covic

It shows me exactly when I want to delay using to execute the programat

warning: commands will be executed using /bin/sh

How can I change this default shell bashto eg?

and

Check out this question posted on the Unix & Linux Stack Exchange . The first sentence says:

Under Linux, you are always warned that it will use /bin/sh instead of your favorite shell to execute the specified command. You can't suppress this message, it's hardcoded in the source code.

It also proposes a workaround:

The command you pass is interpreted by /bin/sh. This command can be the path to a script if you prefer. /bin/sh will then execute the script program, which starts the script's interpreter and interprets the script. The language of the script is completely independent of the program that starts it. So, for example, if you want to execute a bash script (i.e. one that starts with #!/bin/bash), just pass the script path to at and ignore irrelevant messages.

So, to use bashinstead of running a command sh, you can pass a script to at. As long as the script has a shebang line, it will be executed by whatever program the shebang points to. If used #!/bin/bash, it will be executed by bash.

Related


How to change the default shell for the at command

Covic It shows me exactly when I want to delay using to execute the programat warning: commands will be executed using /bin/sh How can I change this default shell bashto eg? and Check out this question posted on the Unix & Linux Stack Exchange . The first sen

How to change the default shell in NixOS?

Sridhar Ratnakumar Currently, I need to make fish shell the default shell on NixOS, and there is no official documentation on how to do it declaratively (not by running chsh) on NixOS . Sridhar Ratnakumar in yours configuration.nix, { pkgs, ... }: { ...

How to change default shell in GCE VM instance?

Paymahn Moghadasian I have successfully created and logged into the GCE VM using ssh -i ~/.ssh/google_compute_engine <EXTERNAL IP>. The VM is running ubuntu 18.04 LTS. I have zsh installed. The output I have verified which zshappears in /etc/shells. When I try

How to change the default python shell version?

Bahadur 60 I am using windows 10 and have python 2.7 and 3.6 installed. I want to open a .py file in IDLE 3.6, but when I try to open it, it opens in 2.7. How can I change the default settings? Casey To make python-2x or python-3x the default python IDLE you n

How to change default shell in GCE VM instance?

Paymahn Moghadasian I have successfully created and logged into the GCE VM using ssh -i ~/.ssh/google_compute_engine <EXTERNAL IP>. The VM is running ubuntu 18.04 LTS. I have zsh installed. The output I have verified which zshappears in /etc/shells. When I try

How to change user default shell in OSX?

David Holm What is the correct OSX way to change a user's default shell? When I googled it, I found references to an application called NetInfo Manager, but I couldn't find it on my system. Someone also mentioned a command line version called niutil, but I did

How to change default shell on AWS instance?

Shripad Krishna I want to change the shell on my Amazon EC2 instance from the default bash shell to zsh. What should I do? Thanks! John T Try using the chshcommand. E.g chsh -s / bin / zsh You can confirm the location of zsh by running whereis zsh, or just run

How to Change the Default Shell of Linux Susbsystem for Windows

envious I have installed Linux Subsystem for Windows 10. It works fine, but I want to change the default shell environment for that subsystem. I did sudo apt-get install fish, then chsh -s /usr/bin/fish. However, when I start bash.exein Windows , it always sta

How to change the default shell used in Byobu (tmux)?

reed I'm addicted to Byobu and I recently switched from bash to zsh. Now, I want to combine the two, but I have a preliminary prerequisite: I can't set zsh as the user's default shell because it's a shared account and none of the rest of the team is as happy w

How to change the default shell used in Byobu (tmux)?

reed I'm addicted to Byobu and I recently switched from bash to zsh. Now, I want to combine the two, but I have a preliminary prerequisite: I can't set zsh as the user's default shell because it's a shared account and none of the rest of the team is as happy w

How to change default shell in GCE VM instance?

Paymahn Moghadasian I have successfully created and logged into the GCE VM using ssh -i ~/.ssh/google_compute_engine <EXTERNAL IP>. The VM is running ubuntu 18.04 LTS. I have zsh installed. The output I have verified which zshappears in /etc/shells. When I try

How to change user default shell in OSX?

David Holm What is the correct OSX way to change a user's default shell? When I googled it, I found references to an application called NetInfo Manager, but I couldn't find it on my system. Someone also mentioned a command line version called niutil, but I did

How to change default shell on AWS instance?

Shripad Krishna I want to change the shell on my Amazon EC2 instance from the default bash shell to zsh. What should I do? Thanks! John T Try using the chshcommand. E.g chsh -s / bin / zsh You can confirm the location of zsh by running whereis zsh, or just run

How to change the default shell used in Byobu (tmux)?

reed I'm addicted to Byobu and I recently switched from bash to zsh. Now, I want to combine the two, but I have a preliminary prerequisite: I can't set zsh as the user's default shell because it's a shared account and none of the rest of the team is as happy w

How to change from csh to bash as default shell

Sumod I have it cshas the default shell as shown echo $SHELL. I want to switch to bashdefault shell. I have tried the following to no avail: With chshthat I get: chsh: can only change local entries; use ypchsh instead. With ypchshthat I get: ypchsh: yppasswdd

How to Change the Default Shell of Linux Susbsystem for Windows

envious I have installed Linux Subsystem for Windows 10. It works fine, but I want to change the default shell environment for that subsystem. I did sudo apt-get install fish, then chsh -s /usr/bin/fish. However, when I start bash.exein Windows , it always sta

How to change PATH for Makefile $(shell...) command?

user 541686 when i run export PATH := mypath $(error $(shell echo "$${PATH}")) Nothing seems to PATHchange for my call shell. Why is this happening and how do I actually change the PATHfor shellcall? Florian Weimer Is this GNU make? There's a long-standing GN

How to change the shell run command integrated in VSCode?

Jack Corman VSCode runs the following command in the integrated terminal when I press f5or ctrl-f5, C:\Stuff\More Stuff> cmd /C "c:\Users\user\.vscode\extensions\ms-vscode.cpptools-1.4.1\debugAdapters\bin\WindowsDebugLauncher.exe --stdin=Microsoft-MIEngine-In-

How to change PATH for Makefile $(shell...) command?

user 541686 when i run export PATH := mypath $(error $(shell echo "$${PATH}")) Nothing seems to PATHchange for my call shell. Why is this happening and how do I actually change the PATHfor shellcall? Florian Weimer Is this GNU make? There's a long-standing GN

How to change the default path of command prompt?

User 10993431 When I open it cmd, this is what I see: Microsoft Windows [Version 10.0.17134.523] (c) 2018 Microsoft Corporation. All rights reserved. C:\Users\me> How can I say: Microsoft Windows [Version 10.0.17134.523] (c) 2018 Microsoft Corporation. All r

How to change the default path of command prompt?

User 10993431 When I open it cmd, this is what I see: Microsoft Windows [Version 10.0.17134.523] (c) 2018 Microsoft Corporation. All rights reserved. C:\Users\me> How can I say: Microsoft Windows [Version 10.0.17134.523] (c) 2018 Microsoft Corporation. All r

How to change default editor for sudoedit command to vim?

and I am trying to use sudoeditbut it keeps running the nanoeditor. My preferred editor is vim. How can I set it as default? On the man page, man sudoeditI noticed the following: EDITOR Default editor to use in -e (sudoedit) mode if neither SUDO_EDI

How to change default editor for sudoedit command to vim?

and I am trying to use sudoeditbut it keeps running the nanoeditor. My preferred editor is vim. How can I set it as default? On the man page, man sudoeditI noticed the following: EDITOR Default editor to use in -e (sudoedit) mode if neither SUDO_EDI

How to change default host in mysql command?

iron sand I want to show grants to a specific user, so I type it like this. mysql> show grants for username@localhost; But usually I only use mysql in localhost. How can I set the default hostname so I can use expressions like this? mysql> show grants for use

How to change the default color of command prompt?

Wasim Shaikh I want to change the color scheme of the command prompt in Windows, preferably the default 0a(green on black background). How can I change it? Stickin Open a command prompt, click the icon (top left), and select Properties . Choose a color , adjus

How to change default host in mysql command?

iron sand I want to show grants to a specific user, so I type it like this. mysql> show grants for username@localhost; But usually I only use mysql in localhost. How can I set the default hostname so I can use expressions like this? mysql> show grants for use

How to change default host in mysql command?

iron sand I want to show grants to a specific user, so I type it like this. mysql> show grants for username@localhost; But usually I can only use mysql in localhost. How can I set the default hostname so I can use expressions like this? mysql> show grants for