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 All,
Trying to get my bash script if statement to work however my if variable equals xxx statement doesnt appear to work, could anyone shed some light.
./script $password &> output
INCORRECTPASS=`grep "Permission denied, please try again." output`
echo "$INCORRECTPASS"
... (8 Replies)
Discussion started by: mutley2202
8 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I was hoping someone could explain this please :)
I'm using bash, scientific linux... and I don't know what else you need to know. With
awk '{ if( 0.3 == 0.1*3) print $1}' file.dat
nothing will be printed since apparently the two numbers do not equate. (Using 0.3 != 0.1*3 is seen... (4 Replies)
Discussion started by: Golpette
4 Replies
4. Shell Programming and Scripting
how to compare to arrays to check if each elements of the first are the same of the second?
for ((i=0;i<$LENGTH;i++)) ; do
for (j=0;j<$LENGTH;j++)) ; do
if } == ${ARR2} ]
echo "Are the same";
fi;
done;
done;
i try this but it doesn't work :(
if i make... (0 Replies)
Discussion started by: tafazzi87
0 Replies
5. Shell Programming and Scripting
Hello i have 2 files:
a.out
10.1.1.1 james.franco
10.1.1.3 google.gol
10.1.1.14 yahoo.bol
b.out
10.1.1.1
10.1.1.3
10.1.1.45
I need to see an output just with:
10.1.1.1 james.franco
10.1.1.3 google.gol
Thankz in advance!! (2 Replies)
Discussion started by: danielldf
2 Replies
6. 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
7. Shell Programming and Scripting
Hi, i have a problem,
I have three files, file_1, File_2 file_3 and I need to compare the data with file_3 file_1, data that are equal to file_3 file_1 should be deleted, file_1 receive data and file_2 file_3.
Ex:
file_1
374905,2001, Selmar Santos, Técnico de Sistemas, U$3.000,00
789502,... (3 Replies)
Discussion started by: selmar
3 Replies
8. Shell Programming and Scripting
Hi,
I have the following script which runs well :-
ls -l /etc/*.txt > /dev/null 2>&1
if ; then
"Success"
fi
But, if I try,
if ; then
"Success"
fi
Does not works !
Even, (4 Replies)
Discussion started by: angshuman_ag
4 Replies
9. 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
10. Shell Programming and Scripting
Hi
I have a file with multiple columns. But there is something weird on column one that is attached to the name. The good thing is that its a consistent pattern so there should be a way to remove it.
So the first column looks something like this:
name_345.4ml
date_3456.4ml
year_12.4ml... (3 Replies)
Discussion started by: kylle345
3 Replies