in reply to Environment discovery under Linux
But I don't understand why it matters what shell the user is running when calling your script. If the script starts with
then the script will be run by bash, unless explicitly run by another shell. In that case, don't do it.#!/bin/bash
Note also that you can get a users login shell by just checking the result of getpwnam().
|
|---|