10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am writing a script as follows:
#!/bin/sh
set -x
for i in `cat a`; do
#sleep 3
print $i >> server.txt
sleep 5
if test -d `vtask $i "' ls -lrt /opt/log/ '" ` ;
then
print $i >> 12.5.txt
else
print $i >> 12.0.txt
fi
done (7 Replies)
Discussion started by: dbashyam
7 Replies
2. Shell Programming and Scripting
Hi there
I am trying to make a fuction that looks for a email profile that ends in .$ARGV
here is the code
if (-d "/Users/$ARGV/Library/Thunderbird/Profiles/*.$ARGV") {
print "\n WARNING: Email profile already exits\n\n";
exit;
}
but for some reason it does... (2 Replies)
Discussion started by: ab52
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
I'm trying to write a script for some xml file handling, but I'm not getting too far with it.
I've got the following xml content
<?xml version="1.0" encoding="UTF-8"?>
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<Operation name="OPER1">
<Action name="ACTION1">... (2 Replies)
Discussion started by: Juha
2 Replies
4. Shell Programming and Scripting
How do I use bash to test whether a string occurs more than two times in a file? (2 Replies)
Discussion started by: locoroco
2 Replies
5. Shell Programming and Scripting
I am trying to initiate a ftp session from my shell script in the following way.
In my script, as per my requirements i am writing the required ftp commands to a file and then I am using this file to carry out the ftp process.
for example
temp.txt will contain
cd /home/user/mydir
append... (2 Replies)
Discussion started by: anijan
2 Replies
6. Shell Programming and Scripting
Hey guys im trying to check if the directory exists
i get a syntax error on the elif statement iv tried using else and still same result im not sure. If the directory does not exist can i just insert mkdir /tmp/old under the elif once that part gets working
if ; then
#do nothing
elif
echo... (20 Replies)
Discussion started by: musicmancanora
20 Replies
7. UNIX for Dummies Questions & Answers
rm: Unable to remove directory /mnt/users/test/logs/: File exists
ls -latr
total 191208
drwxrwxrwx 6 test echo 4096 Jul 3 22:36 ..
-rwxrwxrwx 1 test echo 97692804 Jul 3 22:36 .nfsDFA4
drwxrwxr-x 2 test echo 4096 Jul 3 23:00 .
M not able to delete... (4 Replies)
Discussion started by: solitare123
4 Replies
8. Shell Programming and Scripting
I'm trying to do a simple if statement that tests if a filename exists with a user specified string.
So say I have these files:
Assigned_1day_after_due_chuong
Assigned_1day_after_due_gallen
Assigned_1day_after_due_heidenre
and i'm running a script and want to know if a... (6 Replies)
Discussion started by: bob122480
6 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
Sorry about this i'm sure this is a very silly question hence an easy answer but:
I'm trying to write a script, part of which I want to check if a directory exists, if it doesn't then create it.
Thanks for your help
Tez (3 Replies)
Discussion started by: tez
3 Replies
10. Shell Programming and Scripting
Hi,
I need to prompt for a response from a user to enter a path
read dest_dir?"Please Enter Directory :"
How do I do this until a valid directory is entered by the user. I can use
to check the existence of the directory. However when I try the following I cannot get it to work.
while ... (2 Replies)
Discussion started by: jerardfjay
2 Replies