10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am trying to run a shell script that tests the connectivity to all the sftp servers and email if any one of them is down. There are aliases for all the servers with sftp command prefix in a '.alias' file. But when I use the alias name to run it as a command in my shell script to test... (3 Replies)
Discussion started by: Dippu
3 Replies
2. Shell Programming and Scripting
I need to write something that will read and execute all the files(Mainly executable scripts) inside one or more folders; in other words, a continuous chain with a break when finished. I'm new to shell and need syntax help. I'm on Ubuntu 12.10-Gnome btw.
Here are some main highlights I think... (2 Replies)
Discussion started by: linuxlololol
2 Replies
3. Shell Programming and Scripting
hi there, i've got this alias i want assign only sometimes, and then work in the same shell with it (so when closing the shell the alias dissapears). As the alias is long, i want it to be in a executable file, so i just execute the script from a terminal and then i can access the alias from that... (4 Replies)
Discussion started by: didgewind
4 Replies
4. Shell Programming and Scripting
#!/bin/ksh for AIX
used=0
mount=${1:-"/mountpoint"}
threshold=${2:-80}
#message="hello"
#SUBJECT="Disk Space Alert"
#EMAIL="xyz@abcinc.com"
used=`df -k $mount | grep % | awk '{print $5}' | sed 's/%//g'`
#echo "Free Space available under \"$mount\" is `expr 100 - $used`%.\n">$message
... (6 Replies)
Discussion started by: rajeshw61
6 Replies
5. Shell Programming and Scripting
Hi,
I confess to be stuck ...
as explained here
Aliases - Bash Reference Manual
I added
shopt -s expand_aliasesto my script ... but it didn't work.
Later I've read I had to add this at the begning of my my script :
. ~/.bash_aliases(of course my aliases are in this file)
but again, the... (0 Replies)
Discussion started by: xib.be
0 Replies
6. Shell Programming and Scripting
Hi all,
I have and alias set in .profile like
alias ll='ls -la'
I am writing a shell script in which i am using "ll" but it gives command not found . Can anyone please tell me how source aliases in the script we write do i need to define it again in every script i write is there any oher... (1 Reply)
Discussion started by: firestar
1 Replies
7. Shell Programming and Scripting
Hi
I have to execute the commands in .aliases file from a shell script
I tried
1.giving the alias directly in shell script
2.Giving the actually "value of alias" in the shell script
3. I tried giving both steps 1 and 2 inside ` quotes
Still nothing is working . It says command... (3 Replies)
Discussion started by: ssuresh1999
3 Replies
8. Shell Programming and Scripting
I am not able to access the aliases in my environment within a Python script. If I pass the alias to os.system(), I get a message saying "sh: x: not found". I've tried sourcing my .bashrc file in the script, but this does not work. I would perfer not to source my or any rc file because this... (9 Replies)
Discussion started by: cooldude
9 Replies
9. AIX
Hi Guys,
I want to create user with a script:
user name, user id, primary group, group set, home directory, initial program, password, user information, another user can SU to user. And all the rest is the default.
Does anyone already have the script for this? Can you please share it... (8 Replies)
Discussion started by: itik
8 Replies
10. UNIX for Dummies Questions & Answers
Hello!
I need to run a script from the root user as the other user. I know that I can issue the following command:
su - user_name -c "/path_to_script/script_name.sh"
But there is a small problem with the above command. I must export a environment variable before I run the script. In the... (1 Reply)
Discussion started by: piooooter
1 Replies