kusalananda / shell-toolbox Goto Github PK
View Code? Open in Web Editor NEWUseful shell scripts for /bin/sh
License: BSD 3-Clause "New" or "Revised" License
Useful shell scripts for /bin/sh
License: BSD 3-Clause "New" or "Revised" License
I've just tested 'develop' branch and find an interesting issue. Without parameters shell
returns these shells:
Valid shells:
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
Of cause regular expression ("/$shell$") in line 116 doesn't works in this case (I've added echoing for testing):
[yurij@centos7 bin]$ ./shell bash
Realshell: /bin/bash /usr/bin/bash
shell: No such shell: bash
Valid shells:
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
[yurij@centos7 bin]$ ./shell /bin/bash
Realshell: /bin/bash /usr/bin/bash
shell: No such shell: bash
Valid shells:
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
There are at least two approaches possible in this case:
get_shells
function (line 80) add one condition which checks that file is not symbolic link, because:[yurij@centos7 bin]$ readlink -f /usr/bin/bash
/usr/bin/bash
[yurij@centos7 bin]$ readlink -f /bin/bash
/usr/bin/bash
Can I contribute?
Interesting project. Thanks for this!
Lines 22 to 24 in 93ac362
Are you sure this is what you want?
Isn't printf "%s" "$*" >&2
just fine here?
๐ Cheers!
I've just pulled devel
branch, also reconfigure & make. Start it:
[yurij@centos7 src]$ ./shell
./shell: line 142: [: : integer expression expected
Starting /bin/bash in /tmp/shell-bash.BuwfbqXK
$ exit
exit
Removing /tmp/shell-bash.BuwfbqXK
Assume that keep
variable need to set to zero before handle cmdline options.
Hello,
I just wanted to say that a FreeBSD port of shell-toolbox has been submitted and is awaiting review and approval.
I've tested shell
on FreeBSD a little bit and I confirm it works.
Cheers!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.