Reputation
384
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 10
Newest
 Commentator
Impact
~10k people reached

Apr
12
revised How can I popd to a specific directory?
deleted 7 characters in body
Apr
12
comment How can I popd to a specific directory?
See my edit. If the super cd script doesn't suit you, you can extract the ~ tilda replacement part and put it into a differently named bash function.
Apr
12
revised How can I popd to a specific directory?
added 369 characters in body
Apr
12
comment How can I popd to a specific directory?
You can experiment with removing the quotes but they should be there for the sake of robustness in case you ever pushd a dir that has a space in its path.
Apr
12
comment How can I popd to a specific directory?
Interesting. The above does work for me. Well, at least it seems you're close as it does try to get you to /var/log which, indeed, is the #2-indexed entry in your dir stack.
Apr
12
answered How can I popd to a specific directory?
Mar
23
comment Shell script to execute psql command
Assuming script.sh is the name of your script, if you run ./script.sh, and cding done in script.sh won't have any effect on the shell you start script.sh from. If you do source ./script.sh, it'll be as if you pasted the contents of script.sh into your current shell session and cds will have an effect.
Mar
23
comment Shell script to execute psql command
As for "At the end it doens't go to /tmp"--even if it does, it won't have any effect on the shell you run the script from, unless you source the script in instead of executing it.
Mar
14
comment How can I remotely access my Linux GUI?
VNC is another option
Mar
13
revised Saving colored output regardless of the source
edited body
Mar
13
comment Saving colored output regardless of the source
@Celada I'm not familiar with script, but I've already solved the problem. If script solves it too, feel free to show how, and I'll upvote it or accept it.
Mar
13
answered Saving colored output regardless of the source
Mar
13
comment Saving colored output regardless of the source
Solve the problem of saving output colored with ANSI control characters in a way that doesn't rely on app-specific switches such as "--color-always" given to the output-producing app.
Mar
13
awarded  Commentator
Mar
13
comment Saving colored output regardless of the source
I'm not trying to write a document here.
Mar
13
asked Saving colored output regardless of the source
Mar
7
answered Can Grub2 multi-boot LUKS/LVM distros with only one boot partition?
Mar
7
answered Should I put old projects in tarballs
Mar
6
revised Mounting LUKS from the command line
edited body
Mar
6
accepted Should I put old projects in tarballs