I am writing a script to keep check on free disk space, and I would like to find a way to parse $LINE (see code below) into a numeric value (for free disk space percentage) and a string value (for mount point). If possible, I would like to avoid sed or any additional use of awk since I am not very... (7 Replies)
I need to parse a string in a shell script. I understand there is some in built function to use that. can someone explain the syntax ?
Say, it is like this
#!/bin/ksh
read input
# input is entered as 'welcome'
#Now I want to extract say only first 4 characters or last four #characters.
... (19 Replies)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hi
I wanted to print/store just a specific element of the list . I have got the list as an output of grep command.
here is code snap below :
end_no=`egrep -ni '!return code: 0|return code other than 0' temp.log | cut -d':' -f1`
this will return the line numbers in end_no. I just... (2 Replies)
Hi all,
Just looking for a simple if statement that searches for a substring within a varaible, and then performs some function.
Problem is that I need it to work in Korn shell
$var = *string* does not work in Korn
i="xxxxxx00.00yyyyy.zzzzz"
want to find 00.00 (2 Replies)
Hi everyone,
I am working on fetchmail + procmail to filter mails and I am having problem with parsing a long line in the body of the email.
Could anyone help me construct a reg exp for this string below. It needs to match exactly as this string.
GetRyt... (4 Replies)
hello,
i have a variable which should have following content :
var="value1"
or
var="value2"
or
var="value2:*" # example: value2:22
how can i check :
- if the content is ok (value1 / value2* )
- the two options of "value2"
when content is example "value2:22" , i want to split... (3 Replies)
Anyone ever seen this? Someone mentioned this the other day....
If you do, for instance, in korn shell, echo $(5.2+2.5), it gives the result of 6 regardless.
Can't remember why but it was the limitation of the korn shell. (5 Replies)
Conversion of string into currency value..
ex1:
number_of_positions=2
input_string=345987
Output= 345,987.00
ex2:
number_of_positions=4
input_string=1345987
Output= 1,345,987.0000
Please respond as soon as possible
edit by bakunin: we will gladly respond as soon as... (15 Replies)