10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I have a file like
aa bb dmns|860 dmns|756 ee ff
aa bb dmns|310 dmns|260 ee ff
aa bb dmns|110 dmns|77 ee ff
aa bb dmns|756 dmns|860 ee ff
aa bb dmns|110 dmns|77 ee ff
aa bb dmns|233 dmns|79 ee ff
aa bb dmns|79 dmns|233 ee ff
I want to sort the values in column3 and column4... (2 Replies)
Discussion started by: sammy777888
2 Replies
2. Shell Programming and Scripting
How can I sort this, first by 2nd field then by 1st field.
tried sort -b -k 2,2
Input:
AS11 AB1
BD34 AB10
AF12 AC2
A345 AB10
R134 AB2
456 AC10
TTT2 BD12
desired output:
AS11 AB1
R134 AB2
A345 AB10
BD34 AB10
AF12 AC2
456 AC10
TTT2 BD12 (2 Replies)
Discussion started by: aydj
2 Replies
3. Shell Programming and Scripting
I want to sort my data first by the 2nd field then by the first field.
I can't use sort -V because I don't have gnu sort and cannot install one.
How do I go about this?
Input:
G456 KT1 34
K234 KT10 45
L2 KT2 26
H5 LAF2 28
F3 LAF2 36
Output:
G456 KT1 34
L2 KT2 26
K234 KT10 45
F3... (14 Replies)
Discussion started by: aydj
14 Replies
4. Shell Programming and Scripting
I want to replace a column(first and last) having an alphanumeric value in a file.
Requirement :
1)All values in a Column must be unique and contain an incremented pattern “HCTV0096” for first column and “cafefeca0090” for last column
2)for uniquely identifying each value in column Numeric part... (6 Replies)
Discussion started by: ketanraut
6 Replies
5. Shell Programming and Scripting
I have a lot of data that need to be sorted alphanumerically. I began using sort -du and it solved almost all my problems. However, when I encountered files with data like this it began to fail:
/vol/close_eng_ice_0888
/vol/open_eng_ice_0890
/vol/open_eng_ice_08923
/vol/open_eng_ice_0893... (6 Replies)
Discussion started by: newbie2010
6 Replies
6. Shell Programming and Scripting
Good evening to all!!
I'm facing this problem:
I saved in a txt a list of files name (one txt for every folder):
hello0.jpg
hello1.jpg
hello10.jpg
hello11.jpg
hello12.jpg
hello13.jpg
hello14.jpg
hello15.jpg
hello16.jpg
hello17.jpg
hello18.jpg
hello19.jpg
hello2.jpg
hello20.jpg... (32 Replies)
Discussion started by: silver18
32 Replies
7. UNIX for Dummies Questions & Answers
Hello,everyone. I am learning some Info commands.I put all commands and their explanations in a file.
This is a part of it:
ESC PgUp (scroll-other-window-backward)Scroll the other window backward
ESC Right (forward-word) Move forward a word
ESC r (move-to-window-line)
ESC TAB... (3 Replies)
Discussion started by: vic005
3 Replies
8. Programming
Hy guys. My English is not so good, sorry for any mistakes.
I'm a bigginer in C, and I have a problem. I want to sort ascending n strings, but I can't read the strings. Here is what I've done so far:
//sort ascending n strings
#include <stdio.h>
int main()
{
int n,i,j;
char a;
... (8 Replies)
Discussion started by: 1/0
8 Replies
9. Shell Programming and Scripting
I'm trying to find the longest word in /usr/share/dict/words
The first thing I can think of is to sort the content by length then it would be easy to find out, but then i realize theres no option of sort to sort by length.
Could you guys please give me some help?:confused: (7 Replies)
Discussion started by: rockbike
7 Replies
10. Shell Programming and Scripting
I have a file I'm trying to sort such as
fred1
fred2
fred10
fred11
...
when I sort I get
fred1
fred10
fred11
fred2
...
using sort can any give me the syntax to sort this is dict order
e.g., (4 Replies)
Discussion started by: gefa
4 Replies