My test script:
#!/bin/bash
dirs -p >> work_note.txt
In a stack of 10 directories I only get back the top 1
If I run dirs -p
or dirs -v
on the command line I get the entire stack.
Any tips or knowledge on what I am missing would be appreciated.
NOTE My primary goal is to create a logout process that writes the DIRSTACK to a file so I can recall what work I was doing in a terminal. I usually have multiple terminals going.