Search Results

Search: Posts Made By: gurudewa
6,733
Posted By gurudewa
In /home/stack/.bashrc, there is a function...
In /home/stack/.bashrc, there is a function called salt.

Should I put the same in my bash script?

[stack@undercloud (stackrc) ~]$ cat tst.sh
#!/usr/bin/bash

source /home/stack/stackrc
...
6,733
Posted By gurudewa
stack@undercloud (stackrc) ~]$ grep gurdev...
stack@undercloud (stackrc) ~]$ grep gurdev /etc/passwd
n_gurdev:x:1000:1000:stack:/home/stack:/bin/bash
[stack@undercloud (stackrc) ~]$

[stack@undercloud (stackrc) ~]$ echo $PATH...
6,733
Posted By gurudewa
$ which salt or $ whereis salt returns no salt...
$ which salt or $ whereis salt returns no salt in /usr/.....

The salt command path is NOT shown (unlike most Unix commands) but you can run salt from the Unix shell. Checked in alias also but...
6,733
Posted By gurudewa
That is a typo in this forum. It's (correct) like...
That is a typo in this forum. It's (correct) like the below and the salt command doesn't run but the echo running is working fine. I've tried with #!/bin/sh also. The same salt command works fine...
6,733
Posted By gurudewa
Saltstack commands inside bash scripts don’t work
In a Redhat Linux environment, I could run salt commands on the $ prompt but not inside my bash scripts.

It will say command not found and the $PATH variable is exactly the same outside and...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy