10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello:
I have a large file which contains lines like the following:
1/t123ab, &Xx:1:1234:12345:123456@ABCDEFG... at -$100.00%
/t is a tab, spaces are as indicated
the string "&Xx:1:1234:12345:123456$ABCDEFG..." has a slightly variable number of numbers and letters, but it always starts... (9 Replies)
Discussion started by: Tectona
9 Replies
2. Shell Programming and Scripting
From strings stored in variables, I need to isolate and use the first numerical value contained within them. I will need to know how to produce an integer as well as a floating point decimal. It needs to work on any string regardless of what types of characters (if any) are preceding or following... (3 Replies)
Discussion started by: bradlecat
3 Replies
3. Shell Programming and Scripting
Hi,
I want to truncate a string variable, returned in the script. In perl I used the below and it worked.
BRNo=BR12345
$BR = substr($BRNo, 2, 7)
How can I do it in sh.
Thanks ! (8 Replies)
Discussion started by: script2010
8 Replies
4. Shell Programming and Scripting
Hello all.
I would like to make a script (or two shell scripts) that will do the following.
I need the maximum file name and directory name to be 38 characters long.
As well, if shortening the file name ends up making all of the files in that directory have the same name, then I would like... (9 Replies)
Discussion started by: marcozd
9 Replies
5. Shell Programming and Scripting
Hi,
I am trying to separate the directory from the filename using the substring and it does not like it.
$Complete_name="C:\ABCD\Reports_Split\090308.1630"
I want $File_Name as 090308.1630
I tried using Substring function and it does not like slashes in the complete_name.
Any... (5 Replies)
Discussion started by: sushma0907
5 Replies
6. Shell Programming and Scripting
hi, guys. I have a question.
If I have a long string like this:
8.0K:/home/test/brownj
How can I get a substring which starts from the last slash to the end of the string, so in this case, it will be brownj
Thank you very much for you time in advance
-Keyang (4 Replies)
Discussion started by: daikeyang
4 Replies
7. Shell Programming and Scripting
I have a xml file which contains image tag as follows:
<image><img src="wstc_0007_0007_0_img0001.jpg" width="351" height="450" alt="This is the cover page. Brazil • Japan • Korea • Mexico • Singapore • Spain" type="photograph" orient="portrait"/></image>
... (5 Replies)
Discussion started by: parshant_bvcoe
5 Replies
8. UNIX for Dummies Questions & Answers
I am trying to concatenate 2 files, but before concatenation, I would like to strip off the final character from the first file.
The final character is a form feed (ascii 012 / hex 0C) and there will be an unknown number of these characters in the file. It is only the very last one which I want... (1 Reply)
Discussion started by: Gwailo88
1 Replies
9. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, take the number on that line check if its >0.9 or <0.1 and if this is true write the line to output.out file.
An example of 4 lines in my file is:
1. driver.I177.I11.net010 1.48622200477273e-05
2.... (2 Replies)
Discussion started by: Crypto
2 Replies
10. UNIX for Advanced & Expert Users
$name = 'Mark';
$goodguy = 'Tody';
if ($name == $goodguy) {
print "Hello, Sir.\n";
} else {
print "Begone, evil peon!\n";
}
The output is Hello, Sir......
Even if the Mark is made to MarkSpencer.....then also it shows as Hello, Sir....
Can any one explain the... (7 Replies)
Discussion started by: bishweshwar
7 Replies