10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
I have a newbe syntax error but I cant find it
syntax error: unexpected end of file
#!/bin/csh
# pe request
#$ -pe mpi_16 32
#### 16 core : 'mpi_16 16' || 24 core : 'mpi_24 24 '
# our Job name
#$ -N test2MD
#$ -S /bin/sh (1 Reply)
Discussion started by: dulceC
1 Replies
2. Shell Programming and Scripting
mydate ="$(date)"
what is the use of adding double code and parenthesis in the above code ..
can i write the same code as
mydate= $date (5 Replies)
Discussion started by: lobsang
5 Replies
3. UNIX for Dummies Questions & Answers
hi friends,
I m trying to write a script which compares to dates.
for this i am converting dates into no using synatx
as below
v2=`date | awk '{print $2,$3,$4}'`
v3=`date +%s -d "$v2"`
this syntax is working in bash shell ,but fails in ksh shell.
please suggest on this. (12 Replies)
Discussion started by: Jcpratap
12 Replies
4. Shell Programming and Scripting
I am not an expert of shell scripting, but I can do some simple things. Now, I read a script written by others and I need some help from the experts of this forum.
Please help me to understand what is going on in this cycle:
if ; then
] && \
export... (25 Replies)
Discussion started by: alt
25 Replies
5. Shell Programming and Scripting
Hi Guys,
iīve a question ... but itīs a litte bit tricky:
iīve a 3 php-scripts which runīs via cron at night. These script reads an xml-file a writes it in an MySQL-DB.
I named them (for example here ) Script1 - Script3. The XML-Files i named xml1 - xml3.
Now, iīve build a Batch-file,... (10 Replies)
Discussion started by: jackcracker
10 Replies
6. Shell Programming and Scripting
i have this program in bash shell:
#!/bin/bash
array=(20 20 20 20 20)
i=0
j=0
awk '/%/ {print $3}' try.txt|
while (read s)
arr=$s
i=`expr $i + 1`
echo "$i"
end
how can i convert this into c shell? (1 Reply)
Discussion started by: npatwardhan
1 Replies
7. Shell Programming and Scripting
I'm having simple question here, and what's the different here? What is the "x" for? Thanks! (5 Replies)
Discussion started by: redstone
5 Replies
8. UNIX for Dummies Questions & Answers
I have a variable named "xyz"
Now what will the below snippet mean:
if ( ${?xyz} ) then
....
endif
What does ? signify here.
Thanks (12 Replies)
Discussion started by: vibhor_agarwali
12 Replies
9. Solaris
There is a possibility to set a variable, having an another variable in it's name:
prompt% setenv PRT one
prompt% setenv VAR_${PRT} value
prompt%
So, this way the VAR_one = "value" and could be viewed:
prompt% echo VAR_one
value
prompt%
Q: How to view a variable having another... (0 Replies)
Discussion started by: alex_5161
0 Replies
10. Shell Programming and Scripting
well i have this code here..and it works fine in kornshell..
#!/bin/ksh
home=c:/..../
input=$1
sed '1,3d' $input > $1.out
line=""
cat $1.out | while read a
do
line="$line $a"
done
echo $line > $1
rm $1.out
however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies