10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello, :)
I'm trying to test if a remote directory exist per ssh, I have already made a ssh key and it works :
#!/bin/bash
HOST="10.10.1.22"
FILE_PATH="/var/wwww/html"
ssh -q $HOST ] && echo "Directory exists" || echo "Directory does not exist";
Output :
... (4 Replies)
Discussion started by: Arnaudh78
4 Replies
2. Shell Programming and Scripting
friends can do this from unix AIX
I need to ask for a file that does not exist
then if file.txt
*
**** echo "execute procedure"
else
*** echo "File does not exist"
if
You can sucedere that the file does not exist (2 Replies)
Discussion started by: tricampeon81
2 Replies
3. Shell Programming and Scripting
I am setting a number of variables in my script and I would like to test they exist by using a for loop.
e.g.
VAR1=abc
VAR2=xyz
for i in VAR1 VAR2; do
if ; then
echo Alert
fi
done
But of course the $i doesn't refer to the variable itself, rather to the strings VAR1 & VAR2.
Does... (2 Replies)
Discussion started by: Catullus
2 Replies
4. Shell Programming and Scripting
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Discussion started by: personalt
3 Replies
5. Programming
Hey,
I'm currently getting into some kernel module progamming. As a little exercise I want to read the headers out of an ELF file. My code is very simple, here is the important part:
struct file *fp;
/* ... */
fp = filp_open("some/file/on/my/pc", O_RDONLY, 0);
if(fp == NULL) {
... (15 Replies)
Discussion started by: disaster
15 Replies
6. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
7. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
8. Shell Programming and Scripting
Hi All,
I have txt file which has list of files. I have to check whether these files exist or not.
Thanks
supriya (6 Replies)
Discussion started by: supriyabv
6 Replies
9. Shell Programming and Scripting
I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files uploaded to it via SFTP. It already checks the size of the file to make sure that it is not still... (3 Replies)
Discussion started by: heprox
3 Replies
10. UNIX for Advanced & Expert Users
Hello, i need some help about how to set up a high velocity impact printer in UNIX SCO 5.05,
this printer is attached with a parallel port in a PC(host), the host use tunemul to access unix.(this reference is just to ask you if this is a local or remote connection, just to be sure),
so, i... (2 Replies)
Discussion started by: jav_v
2 Replies