10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
So basically I have this file containing query output in seperated columns.
In particular column I have the below strings:
news
news-prio
I am trying to grep the string news without listing news-prio aswell.
I tried
grep "$MSG_TYPE" ,
grep -w "$MSG_TYPE" ,
grep... (4 Replies)
Discussion started by: nms
4 Replies
2. Shell Programming and Scripting
Hello,
I am trying to eliminate lines where column #1 is duplicated. If it is a duplicate, the line with the greater value in column #2 should be deleted:
file.dat
123 45.34
345 67.22
949 36.55
123 94.23
888 22.33
345 32.56
Desired ouput
123 45.34
949 36.55
888 22.33
345 32.56... (4 Replies)
Discussion started by: palex
4 Replies
3. Shell Programming and Scripting
I am using something like this in my code
nawk 'BEGIN{OFS=FS="|"} {$15='$CalaMig'} {print}' filename
actually value of $CalaMig=01234
But its replacing as 1234 in the 15th postion.Its not taking the first zero.
can some one help here (1 Reply)
Discussion started by: saj
1 Replies
4. Shell Programming and Scripting
Hello, I'm having trouble to read two txt files, they have employee records line by line, I need to do the reading of a file that is old and compare it with the new base in the new file, deleting the lines in old file, then add the new file data from the old file and write to the database manager.... (5 Replies)
Discussion started by: selmar
5 Replies
5. Programming
I have a file like
1 0
2 0
3 1
3 0
4 0
6 1
6 0
. .
. .
. .
i need to eliminate values 3 0 and 6 0 in the same way there are such values in the whole file....but 3 1 and 6 1 shuld be present... (2 Replies)
Discussion started by: kamuju
2 Replies
6. Shell Programming and Scripting
Hi Folks,
I am writting a shell script for general purpose use....
i have created a function like below:-
largest_file()
{
clear
tput cup 20 30
echo please enter the full directory path where you want to search:-
tput cup 21 30
read lr_choice1
tput cup 22 30
echo please... (3 Replies)
Discussion started by: rpraharaj84
3 Replies
7. Shell Programming and Scripting
hi everybody
I am a new user to this forum and its previous posts have been very useful. I'm searching in a file using grep for patterns like
12.13.444
55.44.443
i.e. of form
<digit><digit>.<digit><digit>.<digit><digit><digit>
Can anybody help me with this.
Thanks in advance (4 Replies)
Discussion started by: jpriyank
4 Replies
8. Shell Programming and Scripting
I am trying to show how many users are logged into one of my systems. Using who -q it gives me a user count, but some users are logged in multiple times.
Is there any easy parameter that I can use to ignore/eliminate these duplicates??
Thanks (9 Replies)
Discussion started by: mikejreading
9 Replies
9. UNIX for Dummies Questions & Answers
Hi all, I made a C++ program in dos (in dev-C++) and uploaded it on Solaris box. On opening that file with 'vim' editor i found that there is some extra new lines after each written code line. I tried to find out is the file is in dos or in unix format, with 'file' command,and i got "<file-name>.h:... (4 Replies)
Discussion started by: KornFire
4 Replies
10. Shell Programming and Scripting
Hi All,
I have file
i have values like
----
112
113
109
112
109
I have another file
cat supplierDetails.txt
-------------------------
112|MIMUS|krishnaveni@google.com
113|MIMIRE|krishnaveni@google.com
114|MIMCHN|krishnaveni@google.com
115|CEL|krishnaveni@google.com... (10 Replies)
Discussion started by: kittusri9
10 Replies