10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Folks :)
I have a .txt file with thousands of words. I'm trying to sort the lines in order based on number of words per line.
Example
from:
word
word word word
word word
word word word word
word
word word word
word word
to desired output:
word (2 Replies)
Discussion started by: martinsmith
2 Replies
2. Shell Programming and Scripting
hi all,
i want to get the most comon column w.r.t another
this is my file
Tom|london
Tom|london
Tom|Paris
Adam|Madrid
Adam|NY
the Output to get me :
Tom|london
Adamn|Madrid
ive tried (10 Replies)
Discussion started by: teefa
10 Replies
3. Shell Programming and Scripting
Hi. I am not sure the title gives an optimal description of what I want to do. Also, I tried to post this in the "UNIX for Dummies Questions & Answers", but it seems no-one was able to help out.
I have several text files that contain data in many columns. All the files are organized the same... (14 Replies)
Discussion started by: JamesT
14 Replies
4. Shell Programming and Scripting
Hi,
Can someone help me to get the shortest command
Input file
=========
I|know|"english|french"
It|can|have|four|delimiters
Desired output
===========
"english|french"
have
If I use cut -d "|" -f3 , i am getting "english as 3rd field.But I would like to get the whole text in... (2 Replies)
Discussion started by: anandapani
2 Replies
5. Shell Programming and Scripting
I am trying to count a special character in several thousand files and sort the result according to the number the character occured in each files.
files:
1.txt
2.txt
3.txt
files look like:
ABCDEFGHABBBACF
I want the number of B in each file and a result file that lists the occurence... (4 Replies)
Discussion started by: patdoor
4 Replies
6. Shell Programming and Scripting
Can any one please help I am trying to sort each item in every line and count the common (non case sensitive) and at the end printing all the unique alphabetically.
Here is what i did ... I can print all the lines but struck to sort each line some were:
I am getting the output as:
I... (5 Replies)
Discussion started by: sureshcisco
5 Replies
7. Shell Programming and Scripting
Hi,
I'm new to linux & bash so please forgive my ignorance, just wondering if anyone can help.
I have a file (mainfile.txt) with comma deliminated values, like so:
$1 $2 $3
613212, 36, 57
613212, 36, 10
613212, 36, 10
677774, 36, 57
619900, 10, 10
i need to split this file... (12 Replies)
Discussion started by: BigTOE
12 Replies
8. Shell Programming and Scripting
I want to sort lines by how many times a string occurs in each line (the most times first).
I know how to do this in two passes (add a count field in the first pass then sort on it in the second pass).
However, can it be done more optimally with a single AWK command? My AWK has improved... (11 Replies)
Discussion started by: Michael Stora
11 Replies
9. Shell Programming and Scripting
Hello!
I have a file with 4 columns. I am trying to have it sort first with respect to the first column, and then with respect to the number of counts (in descending count) in the second column within the same first column identity.
For example:
Input:
1 2 A 1
1 6 B 2
2 5 G 7
1 6 D 4
1... (1 Reply)
Discussion started by: anchuz
1 Replies
10. Shell Programming and Scripting
Hi,
I've a fixed width file where I need to count the number of patterns from each line between characters 1 to 15 . so can we sort them and get a count for each pattern on the file between 1 to 15 characters.
65795648617522383763831552 410828003265795648 6175223837... (5 Replies)
Discussion started by: rudoraj
5 Replies