10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have stucked at one point.
When I run the script, I am asking the script to search in database file and if it's found, do nothing and proceed to next line in database file.
#!/bin/bash
./extract_email.pl output2 > database
while read -r COL1
X=$(grep $COL1 database )
if ]... (7 Replies)
Discussion started by: baris35
7 Replies
2. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
3. Programming
Perl script to merge cells
---------- Post updated at 12:59 AM ---------- Previous update was at 12:54 AM ----------
I am using below code to read files from a dir and print to excel.
open(my $in, '<', $file) or die "Could not open file: $!";
my $rowCount = 0;
my $colCount = 0;... (11 Replies)
Discussion started by: Jack_Bruce
11 Replies
4. Shell Programming and Scripting
Dear all,
I have a large dictionary database which has the following structure
source word=target word
e.g.
book=livre
Since the database is very large in spite of all the care taken, it so happens that at times the source word is repeated
e.g.
book=livre
book=tome
Since I want to... (7 Replies)
Discussion started by: gimley
7 Replies
5. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
6. Shell Programming and Scripting
Hi all,
Could someone help me with the following issue:
1st
I have an CSV file delimiter is ";" I I have a column 7 where I need to do some multiple mathem. operation, I need all values in this columns to be multiplied by 1.5 and create a new CSV file with the replaced values.
2nd.
I... (3 Replies)
Discussion started by: kl1ngac1k
3 Replies
7. Shell Programming and Scripting
Hi All,
How to remove col1 and last column in a line. Please suggest some awk stuffs.
Input
col1 col2 col3 col4
col1 col2 col3 col4 col5
col1 col2 col3 col4
col1 col2 col3
Output
Processing col2 col3 ...
Processing col2 col3 col4 ...
Processing col2 col3 ...
Processing... (5 Replies)
Discussion started by: k_manimuthu
5 Replies
8. Shell Programming and Scripting
Hi,
I want to get rid of multiple rows (duplicate, triplicate etc..) for only column 1.
e.g.
iu 2
iu 1
iu 3
k 4
jk 3
nm 4
nm 2
output
k 4
jk 3
thanks (7 Replies)
Discussion started by: phil_heath
7 Replies
9. Shell Programming and Scripting
Hello,
I've never used awk before, but from what I've read, it will best suit what I'm trying to do. I have 2 files. I need to replace strings in file1 with the first column of a matching string in file2. Below are examples:
File1:
random-string1
1112
1232
3213
2131
random-string2... (7 Replies)
Discussion started by: upstate_boy
7 Replies
10. Shell Programming and Scripting
I have text file with hundreds of lines, space delimited, each line has the same amount of "columns" and the same amount of characters in each, Column 1, Column 2, and Column 3.
I need a script that will print all columns of the "current" line along with the last two columns of the next line ONLY... (3 Replies)
Discussion started by: ajp7701
3 Replies