07-02-2010
Quote:
Originally Posted by
Klashxx
Hi, place the end tag is at the beginning of the line.
I'm sorry, but which end tag are u referring to?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/bin/bash
for file in $HOME/*;
do
if ; then
rm -i $file > /dev/null
echo "$?"
echo "$file has been deleted"
fi
done
Been trying to learn shell scripting for a week or so now, when i run the script it doesnt display an error message, seems like it runs fine, however it doesnt delete... (10 Replies)
Discussion started by: stride6
10 Replies
2. Shell Programming and Scripting
The script is
And the error is
+ count=2
./FindEID.ksh: line 227: syntax error near unexpected token `else'
./FindEID.ksh: line 227: ` else'
I just can't find out what the problem is, can anyone tell me about this error is?
Thank you (5 Replies)
Discussion started by: tpltp
5 Replies
3. Shell Programming and Scripting
What is wrong in my IF loop
if
then
echo " The request is authenticated "
fi
The error im getting is
$ ./routing.sh server enables
**********************************************************************
Preparing to service the request for Device server in Question... (9 Replies)
Discussion started by: raghunsi
9 Replies
4. Shell Programming and Scripting
Hi all,
I have been given a task to search for strings in a file that is encoded. I need to display the file name only when all the 3 strings which i provide are present in the file name.
i first try to get a list of files according from the directory according to the value passed in argument... (0 Replies)
Discussion started by: amit1_x
0 Replies
5. Shell Programming and Scripting
hello everybody,
here's my code
mkf ()
{
INDEX=0;
while ; do
touch "file$1.f";
INDEX=$INDEX+1;
done
}
when I type
mkf 10
the loop seems to act infinite
and only the last file of the loop is created, in the example below, there just is file10.f in... (11 Replies)
Discussion started by: Oddant
11 Replies
6. UNIX for Dummies Questions & Answers
Hello guys,
This truly is a newbie question. I'm trying to make a loop to execute simultaneous commands indefinitely while using variable. Here is how my mess looks like (this is just an example):
#!/bin/bash
IP=`shuf -n 1 IP.txt` # I figured this would be easier to select random lines... (4 Replies)
Discussion started by: bobylapointe
4 Replies
7. Shell Programming and Scripting
Hi ! all I am just trying to check range in my datafile
pls tell me why its resulting wrong
admin@IEEE:~/Desktop$ cat test.txt
0 28.4
5 28.4
10 28.4
15 28.5
20 28.5
25 28.6
30 28.6
35 28.7
40 28.7
45 28.7
50 28.8
55 28.8
60 28.8
65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies
8. Shell Programming and Scripting
Here's my code:
awk -F '' 'NR==FNR {
if (/time/ && $5>10)
A=$2" "$3":"$4":"($5-01)
else if (/time/ && $5<01)
A=$2" "$3":"$4-01":"(59-$5)
else if (/time/ && $5<=10)
A=$2" "$3":"$4":0"($5-01)
else if (/close/) {
B=0
n1=n2;
... (2 Replies)
Discussion started by: klane
2 Replies
9. Shell Programming and Scripting
Hello everyone,
I need a little help. I wrote a cshell script to change the format of a file but it is not working.
input file is like that:
2014 3 20 15 0 5.270 40.7739 27.6471 20.232 0.6 0 0 0 1
Site6 4.081 1.00 P
Site6 7.585 1.00 S
Site1 4.441 1.00 P... (9 Replies)
Discussion started by: miriammiriam
9 Replies
10. Shell Programming and Scripting
function get_tablespace()
{
## Get the current size of the tablespace
size=`su -l oracle -c 'db-control report' |egrep "DATA_TBS" | awk '{print $5}'|tr -d '%'`
## Loop through until the size is 82 or less
count=0
while &&
do
... (2 Replies)
Discussion started by: bille
2 Replies
LEARN ABOUT CENTOS
xmstringgenerate
XmStringGenerate(library call) XmStringGenerate(library call)
NAME
XmStringGenerate -- A convenience function that generates a compound string
SYNOPSIS
#include <Xm/Xm.h>
XmString XmStringGenerate(
XtPointer text,
XmStringTag tag,
XmTextType type,
XmStringTag rendition);
DESCRIPTION
XmStringGenerate calls the XmStringParseText function with a default parse table of entries consisting of '', which maps to Separator, and
'', which maps to Tab. Matching RENDITION_BEGIN and RENDITION_END components containing rendition are placed around the resulting
XmString.
text Specifies a NULL-terminated string containing characters of a type determined by type.
tag Specifies the tag to be used in creating the result. The type of tag created (charset or locale) depends on the text type and the
value given. If specified value is NULL, and type indicates that a charset tag should be created, then the tag will have the
value of XmFONTLIST_DEFAULT_TAG. If tag is NULL, and type indicates a locale tag, then the tag will have the value of
_MOTIF_DEFAULT_LOCALE.
type Specifies the type of text to be passed in, and the tag type. If a locale tag should be created, then type has a value of either
XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT. If a charset should be created, type has a value of XmCHARSET_TEXT.
rendition Specifies the rendition tag to be used in an XmSTRING_COMPONENT_RENDITION_BEGIN component which will begin the returned string
and in an XmSTRING_COMPONENT_RENDITION_END component which will end it. If rendition is NULL, no rendition tag is placed.
RETURN
Returns a new compound string. The function will allocate space to hold the returned compound string. When the application no longer
needs the returned compound string, the application should call XmStringFree.
RELATED
XmString(3) and XmStringFree(3).
XmStringGenerate(library call)