Skip to main content

All Questions

Tagged with
0 votes
1 answer
171 views

What's the difference between `hostip` and `windows ip` when set WSL2 proxy by Clash `Allow LAN`?

I have searched and scanned many blogs or websites for “how to set proxy for WSL2”. Such as here or here. My confusion is, that I find the following 2 ways can both set proxy for WSL2 successfully ...
Little Train's user avatar
0 votes
1 answer
930 views

Most effective way to add custom script to /bin? & best practices

Most effective way to add custom script to /bin? I know that I can do: symbolic-link(but I don't understand how to undo this or clean it up, even after researching) alias xxx="/path/to/script&...
Simm Simmons's user avatar
2 votes
2 answers
534 views

Windows equivalent of $ in unix commands

I am following a documentation and executing some commands in Windows 10 command prompt. I have executed the first two commands using setx, since setx is the Windows' equivalent for export and when I ...
chink's user avatar
  • 121
16 votes
4 answers
106k views

Equivalent of export command in Windows

I am following a documentation and executing some commands in Windows 10 command prompt: export OPENAI_LOG_FORMAT='stdout,log,csv,tensorboard' export OPENAI_LOGDIR=path/to/tensorboard/data ...
singh adi's user avatar
  • 171
1 vote
1 answer
586 views

export mpicc in a bash script (for OpenFoam)

I am not able to execute this line via script properly: export PATH=/usr/lib64/openmpi/bin:$PATH; or writing it to a file and sourcing the file: echo "export PATH=/usr/lib64/openmpi/bin:$$PATH" >...
SilenceAndI's user avatar
1 vote
1 answer
2k views

No need for export when running functions in subshell

I have a msource.sh script that will be sourced: $ cat msource.sh #!/usr/bin/env sh echo "($BASHPID) - sourced ${BASH_SOURCE[0]}" &>> "$logfile" # logfile is defined by the sourcing ...
kaligne's user avatar
  • 269
37 votes
3 answers
13k views

What is the 'dot space filename' command doing in bash?

When using bash shell, I sometimes keep environment variables in a text file which I copy/paste the content of, eg exports.txt: export FOO=bar export FIZZ=buzz Someone showed me instead of copy/...
iancoleman's user avatar
0 votes
1 answer
66 views

Naming functions after a path

I want to wrap a function with its full path. $ pwd /home/me $ which pwd /bin/pwd $ function /bin/pwd() { echo "wrapping pwd" command /bin/pwd } && export -f /bin/pwd $ /bin/pwd ...
kaligne's user avatar
  • 269
0 votes
0 answers
886 views

bash: illegal character in an environment variable

According to man bash, bash identifiers may consist: "only of alphanumeric characters and underscores", however, bash seems to have been tolerant to this up until shellshock patch. Actually, it still ...
Ulrik's user avatar
  • 251
0 votes
1 answer
40 views

Bash Export Syntax Compatibility

I often see commands written with the following syntax and I am curious if this is done for compatibility reasons: Snippet from Default .bash_profile on CentOS # User specific environment and ...
dcompiled's user avatar
  • 101
1 vote
1 answer
414 views

Cannot export or set variable in new shell

I experienced something weird when working on a issue. This command does not seem to work. (Using ` to fill blank line). When using export > /bin/bash -c "echo $FOO; export FOO=BAR; echo $FOO" ` `...
Will's user avatar
  • 401
1 vote
0 answers
137 views

iWork Keynote: Automate video export with custom settings for multiple files

I have a couple of Apple iWork Keynote presentations and exporting it to Quicktime with my customized settings from within Keynote is straightforward. But here's my problem: How do I manage to ...
frank's user avatar
  • 11
1 vote
2 answers
4k views

how do I preserve export PATH?

How can I make ssh admin@nas command work if command is in /opt/bin? On my QNAP NAS File /root/.ssh/rc: echo "old path is $PATH" export PATH=/opt/bin:/opt/sbin:$PATH echo "new path is $PATH" on my ...
user2298896's user avatar
5 votes
1 answer
6k views

export PATH= not holding in Bash OS X

This is somewhat of a noob question but I'm having problems adding to my path and can't remember how I got changes working the last time I did it. So I'm using the command "export PATH=$PATH:/Users/...
evanmcdonnal's user avatar
  • 3,188
0 votes
1 answer
2k views

Exporting DISPLAY variable not working

I am able to assign the DISPLAY variable by running the command line: export DISPLAY=:2 echo $DISPLAY (returns 2) hostname (returns opt2) In my #!/bin/bash script using the same command: echo $...
sebastian's user avatar

15 30 50 per page