10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
What I wish to attain is:
- to read fileA line by line
- search entire line as string in fileB
- when found, grep the next line in fileB
- then merge "searched line" and "found line" in a new file, fileC
Here is my fileA:
T S Eliot
J L Borges
L Aragon
L L Aragon
T S Eliot 4 0... (17 Replies)
Discussion started by: baris35
17 Replies
2. Shell Programming and Scripting
Hi,
I am trying to compare 2 lists. However, one of these lists has to be taken from a.pdf file. When I copy the test into a .txt document there are formatting errors which I need to correct. The document is long (~10,000 lines) so I need to script the re-formatting.
Currently my file looks... (9 Replies)
Discussion started by: carlr
9 Replies
3. Shell Programming and Scripting
Hello guys,
I'm making a script to add visudo with this script.
Do you guys know if it's possible to add words to a line-number you want to.
Something like this:
echo "Adding words to line-number 16" >> /etc/sudoers # (options to add to line-number-16)?
Thanks! (3 Replies)
Discussion started by: dannyvdberg
3 Replies
4. Shell Programming and Scripting
Hi,
I am working on Shell script and I have a .dat file in which I want to add line numbers. Please see below example file
Input File:
19523479811841494432C2013052700000000
19523479811730333980A2013052700000000
19523479811417044397I2013052700000000
19523479811205895810A2013052700000000... (7 Replies)
Discussion started by: jnrohit2k
7 Replies
5. Shell Programming and Scripting
Hello,
This one has me a bit stumped. I have data the looks like,
M END
> <PREDICTION_ACCURACY>
PROBABLE
> <NO_OF_PARENTS>
3
> <CLOGP>
-13.373
> <SMILES>
OCC(O)C(OC1OC(CO)C(OC2OC(CO)C
> <MIMW>
1006.322419888 (3 Replies)
Discussion started by: LMHmedchem
3 Replies
6. Shell Programming and Scripting
hey,
i would like to add a line number to the beginning like so:
red
blue
green
yellow
will be:
1=>red
2=>blue
3=>green
4=>yellowplease advise
thank u. (5 Replies)
Discussion started by: boaz733
5 Replies
7. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
8. Shell Programming and Scripting
I have a set of log files that are in the following format
======= set_1 ========
counter : 315
counter2: 204597
counter3: 290582
======= set_2 ========
counter : 315
counter2: 204597
counter3: 290582
======= set_3 ========
counter : 315
counter2: 204597
counter3: 290582
Is... (6 Replies)
Discussion started by: grandguest
6 Replies
9. Shell Programming and Scripting
Hi Folks,
Using the Vi, how can I add a numbers at the end of the line.
For eg: I have the numbers in the file as:
58.125.33
22.58.68
25.144.225
114.25.38
I need to add .0/8 at the end of all the line. So, it should be like
58.125.33.0/8
22.58.68.0/8
25.144.225.0/8
114.25.38.0/8 (6 Replies)
Discussion started by: gsiva
6 Replies
10. Shell Programming and Scripting
Hi there,
I need to add a sequence of numbers to existing variables within the script to be able to call the variable automatically. Somehow it's just printing the loop number. Here's what I've got so far. :eek:
#!/bin/sh
FOLDER1=foo
FOLDER2=bar
FOLDER3=beer
for ((a=1; a <= 3 ; a++))... (2 Replies)
Discussion started by: siul0_0
2 Replies