|
From: LRN <lr...@gm...> - 2012-04-02 12:43:09
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02.04.2012 14:18, nikola bozovic wrote:
> On Friday, March 30, 2012 4:48 PM LRN wrote:
>> On 30.03.2012 17:43, nikola bozovic wrote:
>>> I am working on windows XP, and msys.bat is processed from
>>> built in MS-DOS command prompt, aka cmd.exe. command sh also
>>> accepts a lot of arrguments, and one of them is -c whic is
>>> suposed to be followed by command for execution. that works
>>> olso, but when i call sh -c "notepad" it opens notepad, but it
>>> does not change terminal. if i try sh --login -i -c "notepad"
>>> situation is the same. I need msys to load first and then to
>>> execute command. if i write these two in msys bat it does
>>> nothin, just open and close terminal window.
>> This is quoted from bash manual:
>>> -c string Read and execute commands from string after
>>> processing the options, then exit. Any remaining arguments are
>>> assigned to the positional parameters, starting with $0.
>> That is, `-c' does exactly what it meant to do.
>>
>> Now, to execute something on msys startup you can place a script
>> with .sh extension into ~/.profile.d/ directory (create it if it
>> doesn't exist). Shell will run every script in that directory
>> every time you run a login shell (i.e. with --login). If you want
>> this to be executed only for one startup, add a `rm' call into
>> that script file:
>>> cat ~/.profile.d/run_once.sh
>> #!/bin/sh start notepad.exe rm ~/.profile.d/run_once.sh
> hi there, thanx for your time and attencione, i made one .sh script
> file in /~/.profile.d/ and it is not proccessed on msys
> initialization
Ah, sorry, my bad. I forgot that this is not a standard feature.
Create a ~/.profile file (if it doesn't exist) and put this into it:
for i in ~/.profile.d/*.sh ; do
if [ -f $i ]; then
. $i
fi
done
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPeZ7LAAoJEOs4Jb6SI2Cwe5IIANvXTK72BfqXzK6h1z4pKpqr
rN2UdtImUnTDwv2ES0JK2MEYB8redcSzCStPBjxEzO4j3Zm4QGaL8zUymmS6KXj2
B1EB2iH6ZGfdfY4j98Zrk4mDaX4SbNbx+jnzuiu2F/IJailmKKpN1pWLAYjpLBX6
dU13w/dmzdX0D1QIw6hI1OL7fXtriBRe4snktkuvl4kkzXrz38LuJ6greP4owKar
j2YEkz+7uQSl4kOKwbkyWRhI0YmwSDbKccXLadxYE4GuLPARqE2XLxBkDffQErzY
/7jlCQfsWPFD9gLA8vTx5xemzL/JdO6IXnTpX0kTeenI+cewnfOSt+9ccE96AcY=
=KGz6
-----END PGP SIGNATURE-----
|