Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
75
rated 0 times [  75] [ 0]  / answers: 1 / hits: 41090  / 3 Years ago, fri, may 21, 2021, 5:06:48

may be it seems strange for you, but I want to run command in a specific folder without changing the current folder in the shell. Example - this is what I usually do:



~$ cd .folder
~/.folder$ command --key
~/.folder$ cd ..
~$ another_command --key


Though I want something like this:



~$ .folder command --key
~$ another_command --key


Is it possible?


More From » bash

 Answers
0

If you want to avoid the second cd you can use



(cd .folder && command --key)
another_command --key

[#27346] Saturday, May 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sertold

Total Points: 445
Total Questions: 123
Total Answers: 113

Location: Burundi
Member since Wed, Sep 28, 2022
2 Years ago
;