maelamrani
Member
Hello,
How to redirect multiple command in a text file by a shell script
i did like this :
#!/bin/sh
exec 5>&1 >> /tmp/file1.txt
echo "-------"
/usr/sbin/lsattr -E -l sys0 -a realmem
echo "-------"
/usr/sbin/lsps -a
exec 1>&5 5>&-
There is a simple way to do it ?
Kind regards,
How to redirect multiple command in a text file by a shell script
i did like this :
#!/bin/sh
exec 5>&1 >> /tmp/file1.txt
echo "-------"
/usr/sbin/lsattr -E -l sys0 -a realmem
echo "-------"
/usr/sbin/lsps -a
exec 1>&5 5>&-
There is a simple way to do it ?
Kind regards,