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)
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)
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)
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)
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)
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)