Sponsored Content
Top Forums Shell Programming and Scripting Continue Script when File Found Post 302095496 by Jose Miguel on Tuesday 7th of November 2006 05:45:13 PM
Old 11-07-2006
Quick question then. Why doesn't this code work? It keeps giving me a syntax error:

";" unexpected

Can this instance of the if statement only validate two conditions about the same file, and not check existence of one file and then existence of another?

myfile=/path/to/file
myfile2=/path/to/second/file

while true
do
if [[ -a $myfile && -a $myfile2]]; then
echo "$myfile exists!"
echo "$myfile2 exists!"
rest of code
else
sleep 600
fi
done
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

continue line in perl script

HI , I am new to the perl , I am using a if condition and in that if condition i am checking 7 variables value. so it continue to second line .And if i user "\" for the continue line it showing error. Example : if(a >9 || b>8 || c> 10 \ d > 11) { print(); } The above statement is... (3 Replies)
Discussion started by: julirani
3 Replies

2. Shell Programming and Scripting

How to continue script if right word is not entered?

Hello, I am writing a script and in this script, I want to be able to have the script continue running if the correct word is not entered... Here is an excerpt from me script: read request if ; then echo "You have asked for the System Temperature..." cat... (1 Reply)
Discussion started by: niconico96
1 Replies

3. Shell Programming and Scripting

Doing a tail in a script and then return back and continue script

Hello all, I am trying to do a tail in a script. But when I quit the tail my script quits also. This is not what I want. I am struggling to get this done. #!/bin/bash askFile() { echo -n "Enter file: " read FILE } doTail() { tail -F "${1}" } askFile doTail... (4 Replies)
Discussion started by: markdark
4 Replies

4. Shell Programming and Scripting

Restart and then continue script

How can I get a script to complete a update, varifiy completion, resboot, and continue with script? Is it possbile to get script to add itself to the "startup application" list #!/bin/bash clear sudo apt-get update #Verify/test the update completed #Reboot #Start/comtinue... (9 Replies)
Discussion started by: wolfgangcs
9 Replies

5. Shell Programming and Scripting

Script check for file, alert if not there, and continue checking until file arrives

All, Is there a way to keep checking for a file over and over again in the same script for an interval of time? Ie If { mail -user continue checking until file arrives file arrives tasks exit I don't want the script to run each time and email the user each time a file... (4 Replies)
Discussion started by: markdjones82
4 Replies

6. Shell Programming and Scripting

How to continue numbering after a regular expression has been found

Hello, I have a file starting with: fixedStep chrom=chrX start=1 step=1 0.930 0.955 0.972 0.985 0.993 0.995 0.994 0.990 0.984 0.971 0.942 0.944 0.971 fixedStep chrom=chrX start=200 step=1 0.987 (2 Replies)
Discussion started by: jpoldot
2 Replies

7. Shell Programming and Scripting

How to continue running a script while offline?

Hi there, I'm not really stranger to Linux and shell scripting but I am to servers. Anyway, I usually run scripts on a shared science machine, accessible via ssh. My scripts are usually run with mpi, e.g. mpirun -np 16 ./my_script the things after entering the science machine and running... (6 Replies)
Discussion started by: matteo86
6 Replies

8. Shell Programming and Scripting

Execute script if a file is found

I'm trying to get the following to look for the newest powerpoint presentation and if it finds something then run a shell script named star_presentation.sh and if it doesn't then simply exit. Any help would be greatly appreciated. #!/bin/bash ppts=/ticker/powerpointshare find $ppts... (3 Replies)
Discussion started by: binary-ninja
3 Replies

9. UNIX for Dummies Questions & Answers

File Not found - Bash script

I'm facing issues in executing the bash script of mine. This script will pick the latest file received and connects SFTP server and files is placed on this remote server. Error message Enter password: "File movement" sftp> cd Test sftp> put Test_File_201309.txt File "Test_File_201309.txt"... (6 Replies)
Discussion started by: parpaa
6 Replies

10. Shell Programming and Scripting

Continue the loop if the value is not found

Dear Help, Is it possible to continue the loop by going to the next available value, if the 'expected value' is not found. I have a list of values which might not get incremented by fixed value and hence the loop could break and the script could terminate. Any suggestion is appreciated. ... (1 Reply)
Discussion started by: Indra2011
1 Replies
unaccent(1)						      General Commands Manual						       unaccent(1)

NAME
unaccent - remove accents from input stream or a string SYNOPSIS
unaccent [--debug_low] [--debug_high] [-h] charset [string] [expected] DESCRIPTION
With a single argument, unaccent reads data from stdin, replaces accented letters by their unaccented equivalent and writes the result on stdout. If the second argument ('string') is provided unaccent transforms it by replacing accented letters by their unaccented equivalent. The result is printed on the standard output. The charset of the input string or the data read from stdin is specified by the 'charset' argument (ISO-8859-15 for instance). The output is printed using the same charset. If the 'expected' argument is provided, the output string is compared to it. If they are not equal unaccent exits on error. unaccent relies on the iconv(3) library to convert from the specified charset to UTF-16BE (or UTF-16 if UTF-16BE is not available). You should check the manual pages for available charsets. On GNU/Linux the command iconv -l shows all available charsets. OPTIONS
--debug_low Prints human readable information about the unaccentuation process. See unac(3) for more information. --debug_high Prints very detailed information about the unaccentuation process. See unac(3) for more information. --help -h Prints a short usage and exits. EXAMPLES
Remove accents from the string ete and check that the result is ete. unaccent ISO-8859-1 ete ete Remove accents from file myfile and put the result in file myfile.unaccent unaccent ISO-8859-1 < myfile > myfile.unaccent SEE ALSO
unac(3), iconv(3) AUTHOR
Loic Dachary loic@senga.org http://www.senga.org/unac/ local unaccent(1)
All times are GMT -4. The time now is 09:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy