Skip to main content
Share Your Experience: Take the 2024 Developer Survey
5 votes

How do I sleep for a millisecond in bash or ksh

I had the same problem (no shell usleep on Solaris) so I wrote my own thus: #include "stdio.h" int main(int argc, char **argv) { if(argc == 2) { usleep(atoi(argv[1])); } return 0; } ...
jrichemont's user avatar
5 votes
Accepted

How to identify ancient KornShell version?

CTRL+ALT+V or ESC, CTRL+V This was discovered on a related question on the Unix & Linux SE: How can I safely get the version of ksh? - Unix & Linux Stack Exchange This revealed that we ...
JonathanDavidArndt's user avatar
4 votes

How to identify ancient KornShell version?

Try what $(which ksh) For example, on a Solaris 8 box: $ what $(which ksh) /usr/bin/ksh: Version M-11/16/88i SunOS 5.8 Generic 110662-24 Apr 2007
glenn jackman's user avatar
3 votes

how to make a shell execute with suid

What you are doing wrong is running face-first into a security measure designed to keep the system safe. Bash, dash, and other shells detect that they're being run setuid root and immediately drop ...
Jonathan Beverley's user avatar
1 vote

how to make a shell execute with suid

While shell programs deliberately don't do what you want, you could create your own program that does. This is an example program that will check if you have euid root, and if so, run a specific ...
Jonathan Beverley's user avatar
1 vote

Exclude certain disk in dd command script for disk erasure

The simplest way would be: for disk in $(lspv | awk '{print $1}') ; do case "$disk" in hdisk0|hdisk1|hdisk3) continue ;; *) dd if=/dev/zero of=/dev/${disk} bs=...
RyanH's user avatar
  • 377

Only top scored, non community-wiki answers of a minimum length are eligible