9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to create an executable bash script that will run the following commands as root, that is, using sudo su
iptables-save | awk '/^
/ { print $1 }
/^:+ / { print $1 " ACCEPT" ; }
/COMMIT/ { print $0; }' | iptables-restoreMy first attempt at bash... (9 Replies)
Discussion started by: thixeqi
9 Replies
2. Shell Programming and Scripting
Hi,
While running my ksh file, I require the logs to be written to another file. For this I use the below code:
write_log()
{
echo `date +"%d %h, %Y %H:%M:%S"` " : " $* >> ${LOG_FILE}
}
But inside my ksh file, am connecting to sftp server and executing some commands.
So while i see... (8 Replies)
Discussion started by: confused_info
8 Replies
3. Shell Programming and Scripting
Hi All,
I just want to know how to get the executable name of the perl script as i know "$0" will give me the script name but i want to know the executable name which i got it from the script using pp command.
Regards
Raj (1 Reply)
Discussion started by: kar_333
1 Replies
4. UNIX for Dummies Questions & Answers
Platforms : Solaris 10 and RHEL 5.6
I always get double quotes , single quotes and asteriks mixed up for find, ls and grep commands.
The below commands retrieve the correct results. But , unders stress , I get all these mixed up :mad: .So, i wanted to get a clear picture.
Please check if... (7 Replies)
Discussion started by: John K
7 Replies
5. HP-UX
I have file with large size in HP-UX os. I need to compress on HP-UX and ftp to linux server and i need to uncompress the files. How can i do this? Any help is highly appreciated.. (3 Replies)
Discussion started by: govindts
3 Replies
6. UNIX for Dummies Questions & Answers
Hi
I would like to ssh into serveral servers, print the hostname and do an ls (of files in a certain directory), and add these details to a file.
so i have this:
#!/usr/bin/bash
for host in hostnames_here
do
ssh $host echo "$HOSTNAME" ls /directory_location > ~/new_file_name.txt
... (6 Replies)
Discussion started by: horhif
6 Replies
7. Shell Programming and Scripting
i have two files as
file1:
1
2
3
file2:
a
b
c
and the output should be:
file3:
1~a
2~b
3~c (1 Reply)
Discussion started by: mlpathir
1 Replies
8. AIX
Guy's
I have sudo already installed in AIX , just I want to know how can I add for example the following commands to be executed by sudo by (appuser)..
shutdown
/usr/startapp.sh
/usr/stopapp.sh (5 Replies)
Discussion started by: ITHelper
5 Replies
9. UNIX for Advanced & Expert Users
how do you cause a running pocess to dump a core file on linux systems??
i tried
sleep 100 &
kill -SEGV PID
but nothing is created
also, what commands can be used to analyze them? (extract useful info from them) (2 Replies)
Discussion started by: TRUEST
2 Replies