Simple script? First timer...

Hey guys, I'm brand new to the bash scripting world, here's my issue..

When people SSH to my box, I'm wanting to use screen to monitor them if I so choose. So, I've created a new user: testing, and I've set its startup shell to /bin/myshell.sh whose contents read this:

#!/bin/sh
$me = whoami
screen -S $me
/bin/bash

This is, for some reason, locking my entire system up..

Any help is greatly appreciated, as I've no clue what the hell I'm doing here. Thanks guys!

Not sure what's wrong- I don't use screen much myself- but I notice a couple of bugs in your code.

First, if you want to use bash call it as bash and not sh. Bash does things to make it more sh-like if you call it as sh.

Next, you have some errors that will not allow your code to work even if screen does what you want it to do. Your code should look like this:

#!/bin/sh
me=`whoami`
screen -S $me
/bin/bash

Ahh I see, thank you. I'll test it out, just a little nervous of the whole system lockup from that, lol.

Hi
I also have a process that trigger every one minute. I use sleep function in script with infinite loop.

while [ 1 -lt 2 ]
do
clear
file=0
killall -u `whoami` -q soffice
soffice -invisible -norestore -nofirststartwizard -nologo -headless "-accept=socket,host=localhost,port=8100;urp;" &
sleep 15s
find /temp/papers/ -name ^.doc | while read a;
do
file=$(($file+1))
filename=`echo "$a" | sed 's/\(.
\)...../\1/'`
echo Converting $filename.doc
python DocumentConverter.py "$filename^.doc" "$filename.pdf"
errorcode=$?
if [ $errorcode -eq 0 ]; then
mv "$a" "$filename.doc"
echo Successfully Convert $filename.doc
fi
if [ 0 -lt $errorcode ]; then
echo Can not convert $filename.doc error $errorcode
fi
done
killall -u `whoami` soffice
echo Total files: $file
echo Waiting for next interval
sleep 60s
done

I run the above script from Terminal, it is working fine.
I would like to start this process automatically on my linux startup.
So I put calling my script file in /etc/rc.d/rc.local.
When I reboot, OS hang on startup. I think OS is looping infinite loop of my script.

How can I solve?

Thanks

sorry buddy don't put your question inside any thread.
start a new thread..