Skip to content

Commit 5435e59

Browse files
author
mdouchement
committed
Update Moby enter and line differ command
1 parent c2d8aa4 commit 5435e59

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.dockerfunc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dfstats(){
1919

2020
moby(){
2121
# Enter in Moby runtime (Docker's xhyve)
22-
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
22+
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i ash
2323
}
2424

2525
del_stopped(){

.profile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,13 @@ if [ -f ~/.dockerfunc ]
8989
then
9090
. "${HOME}/.dockerfunc"
9191
fi
92+
93+
# Quick and dirty line displaying.
94+
#  $1 -> line number
95+
#  $2 -> first file
96+
#  $3 -> second file
97+
# Usage:
98+
# lshow 4 file1.txt file2.txt
99+
lshow() {
100+
head -n $1 $2 | tail -n 1 && head -n $1 $3 | tail -n 1
101+
}

0 commit comments

Comments
 (0)