I have lines in some files that look exactly as below, and the line numbers they occur in are always the same. (Lines 136-139)
W 0.00000000 0.00000000 2.00000000
W 0.50000000 0.50000000 2.50000000
W 0.00000000 0.00000000 3.00000000
W 0.50000000 0.50000000 3.50000000
I'd like to replace the last number in each row for each file by numbers related to the variable $vacheight, so that the median of these 4 numbers is always half of $vacheight.
The files are all named "run_example", but are in different folders named "examples#" where # is a number from 140 to 199.
As a related example, Line 117 reads:
Below is the relevant section of code that works for Line 117 and increments the number on Line 117 by 0.1 each time, in a different folder.
Hi, I need to replace a character between two numbers (specifically a - to a _). The problem is that they can be *any* numbers. So, I need a one liner to turn a file like this:
1-2
3-4
55-66
4323-12312893
into the following
1_2
3_4
55_66
4323_12312893
Any help would be appreciated! (5 Replies)
Hi
I'm trying to remove what I "think" is a bad character. How I got the bad character is when I downloaded jpgs onto my PC and then renamed the files using windows explorer. In cygwin, the files look like
$ dir -l
total 7840
----------+ 1 None 3647968 Jul 21 08:41 2012-07-21\ (1).JPG... (6 Replies)
hi i have two files
one of the form
1 2
2 45
3 56
4 98
5 6598
6 98
7 10
8 0
9 15
10 56
This file's significance is that it maps the number in first column to that of the number in second column
The other file is of the form
1
2 (1 Reply)
Greetings,
I am using tcsh to write a script that will replace the numbers in a file with a single number, the caveat is that this file has blank lines which are necessary for another step down the line so I need to preserve the blank lines. I have tried sed and awk but both will collapse the... (1 Reply)
Hello All,
Currently in our current production environment in the existing shell scripts we were using Tivoli software to send email alerts, now we have a request from the client to replace the Tivoli with Fog Light software to send the email alerts. Could you please tell me whether it is... (0 Replies)
Hi,
I have to write a program to compute the checksums of files
./script.sh
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Hi All,
I am trying to write a shell script which firstly will search some files and then increase the port numbers mentioned in them by a certain no.
let me clear it with an example-
suppose there r few files a,b,c,d....
file a's content-
<serverEntries xmi:id="ServerEntry_1"... (3 Replies)
I have some ASCII files containing numerous numbers. What I'd like to do is replace all numbers greater than 0 with 1.
Examples of the numbers include: - 000011 and 000042
Thanks (4 Replies)
I am trying to parse hundreds of shell scripts to determine how they related to each other. Ideally for every script, I would get an output of:
What other scripts it calls
What files it reads
Environment variables it accesses
Any ideas on how to do this?
TIA! (2 Replies)
I have a file which contains lots of text (comment field). I would like to parse through the comment field which can be up to 255 characters long and look for anything that seems to resemble, say, a credit card number or customer account number, etc. and replace the numbers with asteriks (*).
... (9 Replies)