10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following awk script and I want to change it to be inside a condition for the file extension.
################################################################################
# abs: Returns the absolute value of a number
function abs(val) {
return val > 0 ? val \
... (4 Replies)
Discussion started by: kristinu
4 Replies
2. Shell Programming and Scripting
I have the following in an awk script. I want to do them on condition that: fext == "xt"
FNR == NR {
/>/ && idx = ++i
$2 || val = $1
next
}
FNR in idx { v = val] }
{ !/>/ && srdist = abs($1 - v) }
/>/ || NF == 2 && srdist < dsrmx {... (1 Reply)
Discussion started by: kristinu
1 Replies
3. Shell Programming and Scripting
Hi,
I am in trouble. I can get inside my condition test inside a loop :
I am in ksh (solaris)
while read file
do
<commande to retrieve file> >> ${LOG_RETRIEVE_FILE.log}
msg_err=$(cat ${LOG_RETRIEVE_FILE.log} | grep "error retrieve")
if ; then
<sendmail>
exit 1
fi
done
I tried... (6 Replies)
Discussion started by: Aswex
6 Replies
4. Shell Programming and Scripting
hi i need help with below code.
if ]
then
log "Exiting the script as ID= NULL"
log "Please run script first."
fi
i am calling grep inside this but its not running any ideas why ??
input file is like this --
Msg 102, Level 20, State 1:
Server... (4 Replies)
Discussion started by: dazdseg
4 Replies
5. Shell Programming and Scripting
Hi All,
I am facing a alien problem in unix shell script.
i have a requirement where i have to check first whether a particular file has been created or not if that file has been created then that file needs to be ftped to a particular dir.
My Code is like that
Success='code for file... (3 Replies)
Discussion started by: aryan_styles
3 Replies
6. Shell Programming and Scripting
I have a logic like this
It initializes the flag variable as "T" at the beginning of the loop everytime
Inside each loop it checks for two conditions and updates the flag variable as "A" or "B"
In the end of the loop it checks for the value of the variable flag for "A" or "B" and execute... (4 Replies)
Discussion started by: codeman007
4 Replies
7. Shell Programming and Scripting
Hi All!
I have obtained following output from a tool "pdftohtml" ::
So, my input is as under:
<text top="246" left="160" width="84" height="16" font="3">Business purpose</text>
<text top="260" left="506" width="220" height="16" font="3">giving the right information and new insights... (3 Replies)
Discussion started by: parshant_bvcoe
3 Replies
8. Shell Programming and Scripting
I have a for loop in my script as shown below.
for file_path in $file_list ; do
........my code
..........
......
done
Can i restrict the number of files parsing to the variable file_path as 50?
That is, even if I have some 100 files in file_list, I need to take only 50 files for... (7 Replies)
Discussion started by: Vijay06
7 Replies
9. Shell Programming and Scripting
Hi all,
I have one clarification i am using the loop which will process for each record .suppose there is f ailure in the first record it need to send mail and process the next .my code:
defcount=`cat <filename>|wc -l`
while ]
do
if <some condiotion>
then
echo "mail"
fi
done
so... (1 Reply)
Discussion started by: ithirak17
1 Replies
10. Shell Programming and Scripting
Hi
I am writing a script file which sends the log files along with their size in a folder named log to a file called temp.log using the following cmd:
ls -st 190_GSTV_HUX_003QISCGSK026** >> /home/user/temp.log
the temp.log looks like this:
16 190_GSTV_HUX_003QISCGSK026_message070321.log
... (11 Replies)
Discussion started by: kiran1112
11 Replies