Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Alias has no effect in script

$
0
0
It doesn't have effect in script but it works on the terminal
Code:

root@server:/opt/kvm/usecases/logs# alias echo='echo -e'
root@server:/opt/kvm/usecases/logs# echo "xxxx\n"
xxxx
root@server:/opt/kvm/usecases/logs# cat xx.sh
#!/bin/bash
alias echo='echo -n'
echo  "sssf \n"

root@server:/opt/kvm/usecases/logs# ./xx.sh
sssf \n


       
Code:

       
alias ssh='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'

also has no effect in script


Viewing all articles
Browse latest Browse all 16232

Trending Articles