10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to develop a process/daemon which will constantly monitor a file for new entry and execute a command.
for eg, there is a file /var/log/inotify.log
When a new entry like below gets appeneded to this file, execute the command as follows.
/home/user/public_html/bad.php|CREATE
... (2 Replies)
Discussion started by: anil510
2 Replies
2. Shell Programming and Scripting
Hi,
I am facing issues with the below:
I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,).
Now i want to read this command from file and execute it.
So my code below is :
Contents in the lookup.lkp file is :
c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies
3. Shell Programming and Scripting
Hi,
can some one help me how to encrypt and decrypt a file.
AIM: reade user input, encrypt it and save it to file.
while decryption read the encrypted file decrypt it and save the output in some variable.
Example: consider we have Credentials.txt file with content username: password... (5 Replies)
Discussion started by: saichand1985
5 Replies
4. Shell Programming and Scripting
hello,
I have prepared a script
------------------------------------------------
#!/bin/sh
cat test.txt| sed '1d' | sed '$d' > /tmp/tmp1.txt
while read line
do
typeset -i count=`echo $line | tr ' ' '}' | wc -c`
finalcount=`expr $count - 1`
echo $finalcount
done <... (12 Replies)
Discussion started by: rac
12 Replies
5. Shell Programming and Scripting
Hi
I am new to writing script and want to use a Bash Piped while-read and read from user input.
if something happens on server.log then do while loop or if something happend on user input then do while loop.
Pseudocode something like:
tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies
6. Shell Programming and Scripting
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Discussion started by: shadok
2 Replies
7. Linux
Hi Gurus ,
I hope you are doing great .
Other than owner of the file , OTHERS and GROUP should be restricted from read or write a file created by the owner.
OTHERS and GROUP should be only allowed to execute the file.
Thanks in advance. (8 Replies)
Discussion started by: palanisvr
8 Replies
8. Shell Programming and Scripting
Please help with this simple example. I can not figure out how to do it. A file named “job” contains only this one line:var=5I need a script to read the job file and execute it as a command. This is my attempt (it does not work):#!/bin/sh
exec < job
echo "var = $var"output should read “var = 5”... (5 Replies)
Discussion started by: wolfv
5 Replies
9. Shell Programming and Scripting
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies
10. Shell Programming and Scripting
Hi folks,
Need your help.
I am writing a KSH script to read a few commands from a file & execute.
I am using the following code to read the file line by line & excute each command. When I am printing each line I see it is printing properly but while excuting, the particular "ps" command... (5 Replies)
Discussion started by: tipsy
5 Replies