All Questions
14
questions
0
votes
1
answer
734
views
How to source a script code (set a variable) from another shell?
I tried to use FreeBSD.
The FreeBSD root user uses csh by default.
user@freebsd-13:~ $ echo $SHELL
/bin/csh
I know that setting a variable via $() does not work in csh.
root@freebsd-13:~ # export ...
1
vote
2
answers
125
views
how to create a csh script that can identify the correct USB disk where I have saved my virtual machines
I'm running Freebsd 13R and as shell I'm using csh. I would like to create a script,that looks the presence of the word "r1w1e2" or "NM13N4CZ" or "3e4d31334e34435a" when ...
3
votes
2
answers
4k
views
How to reload aliases added in ~/.cshrc without reboot FreeBSD 11.3
As the title states, how to reload aliases added in ~/.cshrc without rebooting FreeBSD 11.3?
2
votes
1
answer
2k
views
Is there a way to disable history for one command in TCSH?
I am executing a command in TCSH, which requires me to pass a password on the command line. Obviously, I would like it not to be saved in the history file.
I know that other shells like Bash supports ...
2
votes
1
answer
695
views
How to use if on csh FreeBSD from test if file is older then X minutes
I have the following code working in Debian system's:
for File in "${Files[@]}"; do
if test "`find $FolderDownload/$File -cmin -190`" ; then
echo "File is new then 3 hours"
# Set ...
1
vote
1
answer
650
views
FreeBSD: Is the default user shell `tcsh`?
I was recently reading a tutorial for tcsh and it said that the default user shell for FreeBSD was tcsh and I was surprised.
For FreeBSD, is the default user shell tcsh?
1
vote
1
answer
221
views
How to avoid 'ambigous redirect' when executing command over ssh
I'm trying to execute a script on a remote server via ssh.
the command should go to the background and continue to run after logout.
The result of the command should be redireced to out.log on the ...
1
vote
2
answers
484
views
Syntax for `repeat` with a semicolon in the command string?
I'm keeping an eye on a process in FreeBSD using a script which outputs the current status of the job.
Using the csh builtin command repeat, I'd like to run the script every 2 seconds, so naively I'd ...
1
vote
3
answers
4k
views
How to replace one line with two lines using sed in csh on BSD?
I have a very simple text file here with the following contents
line1
line2
line3
line4
I want to modify the contents via sed(or some other app) so it becomes
line1
line2
#this line was added by ...
1
vote
1
answer
2k
views
Vim mode in FreeBSD shell?
How can I switch to Vim mode in FreeBSD shell?
I echoed the value of $SHELL and it is /bin/csh however man csh opens tsch's manual page.
set -o and shopts are not available as well.
And /etc/...
3
votes
1
answer
3k
views
Writing a simple rc.d script in FreeBSD
I would like to run the ELK stack in a FreeBSD Jail on an FreeNAS host. I have a hard time to get an simple init/rc.d script to work.
#!/bin/sh
. /etc/rc.subr
name=logstash
rcvar=logstash_enable
...
1
vote
1
answer
6k
views
FreeBSD csh, TAB to show available choices?
How can i configure csh or tcsh to show available choices by pressing Tab twice, just like bash?
15
votes
4
answers
40k
views
stderr redirection not working in csh
I run the following command:
pkg_add emacs-23.4,2.tbz 2> output.log
The output still displays in the terminal. When I press ↑, I get
pkg_add emacs-23.4,2.tbz 2 > output.log
with a space ...
1
vote
1
answer
869
views
colorizing ls output based on filename
i'm on freeBSD and trying to colorize ls output, so i've added
alias ls ls -lhG
setenv LSCOLORS gxfxcxdxbxegedabagacad
to my .cshrc
and it works. but what i really want to - is to be able ...