im sorry if i dont understand your suggestion correctly.. is it like this?
---------- Post updated at 05:34 AM ---------- Previous update was at 05:32 AM ----------
Quote:
Originally Posted by elixir_sinari
Seems carriage-return characters are in your file. How did you get this file? From a Windows machine? FTP? binary mode?
Use dos2unix utility on the file.
I know that this is a ridiculously simple statement, but I am getting an error when I execute it, and I can't figure out what it is. Can anyone point me in the right direction?
#!/bin/ksh
integer dateMonth=0
integer intZero=0
if
then
dateMonth = 1
fi
echo $dateMonth (7 Replies)
In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands.
How do I write the "do nothing" statement in the following example?
Example:
if (( "$x"="1" && "$y"="a" && "$z"="happy" ))
then
do nothing
else
command
command
fi... (3 Replies)
cmd="find /a/technologies -name '*.jar' | grep \"Tuning/specificloader/lib\""
echo $cmd
for index in `$cmd`
do
SL_JARS="${SL_JARS}:${index}"
done
gives error ==>
find: paths must precede expression
Usage: find
but
for index in... (2 Replies)
I started writing a script to save the files from a camera I got the other day, which mounts in /Volumes , and I got into it and started building this menu. The only problem is that the switch case is coming up as a syntax error at the parenthesis after a case. Here is the code:
while :
do
... (2 Replies)
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)
echo $line | awk -F, "BEGIN {if(NF==10) && /'"${MONTH}"' '"${DAY}"' '"${TIMEH}:"'/,0 {print $10"-"$4} else {print $13"-"$4}}"
if the fields in the line is equal to 10, print the values of this specified fields "$10 and $4".
if the fields in the line is anything but 10, print the values of... (5 Replies)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Hi
I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement?
Code:
if && &&
then
fector=$kk;
divide=$DB_SIZE/$kk;
echo "factor value:$fector"
echo"divide... (1 Reply)
Hi
I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement?
if && &&
then
fector=$kk;
divide=$DB_SIZE/$kk;
echo "factor value:$fector"
echo"divide value:$divide"... (1 Reply)
Hi
I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement?
if && &&
then
fector=$kk;
divide=$DB_SIZE/$kk;
echo "factor value:$fector"
echo"divide value:$divide"... (4 Replies)