Sponsored Content
Top Forums Shell Programming and Scripting convert a=(b/100)*a into a "expr" expression Post 302335688 by kshji on Monday 20th of July 2009 08:09:36 AM
Old 07-20-2009
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Convert "text" to "packed-decimal"?

Is there a way with HP-UX Release 10.20 (but going to HP-UX 11) to convert a regular "text" file to a packed data format (such as is created by a Cobol program)? (2 Replies)
Discussion started by: HuskyJim
2 Replies

2. Shell Programming and Scripting

why "expr "${REPLY}" : '\([1-9][[:digit:]]*\)" can figure out whether it is a digit?

I found below script to check whether the variable is a digit in ksh. ############################ #!/bin/ksh REPLY="3f" if ]*\)'` != ${REPLY} && "${REPLY}" != "0" ]] then print "is digit\n" else print "not digit\n" fi ############################ Although it works fine, but... (6 Replies)
Discussion started by: sleepy_11
6 Replies

3. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

4. Shell Programming and Scripting

HowTo: reg expr doing grep "timestamp>$DesiredTime" logfile ?

I know I asked a similar question but I want to know if there is a regular expression existing that with a korn shell cmd, finds any timestamp data records in a file where it is greater then a timestamp in a shell variable ? something like : grep all records where it has a timestamp >... (5 Replies)
Discussion started by: Browser_ice
5 Replies

5. Shell Programming and Scripting

How to convert "Nov 9 11:35:28 2009" to "200911091135"

Using AIX 5.3 and /user/bin/ksh. Anyone have a quick way to convert the string date Nov 9 11:35:28 2009 to 200911091135 I know I could create a table of months and find the month number by searching the list, but I was hoping there was some handy little known command to do this... (15 Replies)
Discussion started by: troym72
15 Replies

6. Shell Programming and Scripting

cshell integer expression from "0000" to "1999"

I have 2000 files named like "file-fr0000.log", "file-fr1999.log"... I wanna generate the file names automatically in the following c shell script: set fr = 0 while ($fr <= 1999) grep "ENERGY" file-fr$fr.log > data.dat @ fr = ( $fr + 1 ) end The above will generate file names... (3 Replies)
Discussion started by: rockytodd
3 Replies

7. Shell Programming and Scripting

why "aab" matchs "ab" when using reglar expression ?

Please see the following code, why "aab" matchs "ab" when using reglar expression ? $ ] && echo "ok" || echo "error"; ok $ ] && echo "ok" || echo "error"; error $ ] && echo "ok" || echo "error"; error $ ] && echo... (8 Replies)
Discussion started by: 915086731
8 Replies

8. Homework & Coursework Questions

How to lclear "expr: syntax error" eventhough everything looks fine?

Hi All, As per my knowledge in unix, my code looks fine. But still I am getting error (expr:syntax error). Please help me to resolve this error. Script : PRE_LBNO=0 PRE_DATE=0 TOT_PAY=0 TOT_REM=0 TOTAL=1 for Record_Type in `cut -c 1 Inputt.dat` do if ; then CURR_LBNO=` cut -c... (6 Replies)
Discussion started by: lathanandhini
6 Replies

9. Shell Programming and Scripting

Commenting out "expr" creates weird behavior

This really puzzles me. The following code gives me the error 'expr: syntax error' when I try to do multi-line comment using here document <<EOF echo "Sum is: `expr $1 + $2`" EOF Even if I explicitly comment out the line containing the expr using "#", the error message would still exist... (3 Replies)
Discussion started by: royalibrahim
3 Replies

10. Windows & DOS: Issues & Discussions

Convert "hex" foldername to "ascii"

So, I have a folder, containing subdirs like this: 52334d50 52365245 524b4450 524f3350 52533950 52535050 52555550 now I want to go ahead and rename all those folder: hex -> ascii (8 Replies)
Discussion started by: pasc
8 Replies
ns_geturl(3aolserver)					    AOLserver Built-In Commands 				     ns_geturl(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_geturl - commands SYNOPSIS
ns_geturl URL ?headersSetId? _________________________________________________________________ DESCRIPTION
This command retrieves the contents of the specified URL. The URL must be a remote http server, or a file relative to the pageroot (begins with /). It does not handle a relative request or follow redirects. The headerSetId option is a variable containing an ns_set Id (not expanded with a $) used to store the remote server headers (see example). ns_geturl only support HTTP version 1.0. EXAMPLES
set page [ns_geturl "www.aolserver.com"] ns_return 200 text/html $page This fetches the contents of www.aolserver.com and returns that page to the client. set headers [ns_set new] set page [ns_geturl "www.aolserver.com" headers] for {set i 0} {$i < [ns_set size $headers]} {incr i} { ns_puts "Key: [ns_set key $headers $i]" ns_puts "Value: [ns_set value $headers $i]" } This time, a blank headerset is passed to ns_geturl so we can retrieve the headers of the remote page, which we print out to the client. set file [ns_geturl "/foo/bar.html"] ns_return 200 text/html $file This example fetches the /foo/bar.html file relative to the pageroot and returns it to the client. SEE ALSO
nsd(1), info(n), ns_set(n), ns_httpget(n) KEYWORDS
AOLserver 4.0 ns_geturl(3aolserver)
All times are GMT -4. The time now is 09:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy