10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi.
I'm trying to sort a list of items in a file alphabetically but starting from the letter 'X'. For instance if I had the following file;
test.txt
Z
A
T
W
Y
B
S
X
I would like the output to look like;
X
Y (8 Replies)
Discussion started by: mmab
8 Replies
2. Shell Programming and Scripting
I have a problem with my homework I need to create a shell script using #!bin/awk -f
the script will output the file in an alphabetical order only words and after the word is : after that a space then , then it will be numbered each character by which line its been for example
CB
92A
A... (1 Reply)
Discussion started by: collapse
1 Replies
3. UNIX for Dummies Questions & Answers
Hello all,
I have a list of file names in a text document where each file name consists of 4 letters and 3 numbers (for example MACR119). There are 48 file names in the document (they are not in alphabetical or numerical order). I would like to reorder the list of names so that the 48th name is... (3 Replies)
Discussion started by: MDeBiasse
3 Replies
4. Shell Programming and Scripting
I have files like this:
1
3
4
6
14
3
6
I want to extract the highest number. I have tried using
cat filename | sort
but then 9 would become higher than 14.
So how do I sort? (1 Reply)
Discussion started by: locoroco
1 Replies
5. Shell Programming and Scripting
Hello Everybody :) !!!. i have question in mind, is it possible to sort a list of hexadecimal numbers using "sort" command? (9 Replies)
Discussion started by: Kesavan
9 Replies
6. Shell Programming and Scripting
Greetings - I'm not necessarily new to bash scripting - I'm probably between beginner and intermediate, but I have something that I just cannot figure out after many attempts to find it. I have a file that is merely a list of many files, with their respective paths, and a branch path (ClearCase)... (5 Replies)
Discussion started by: 1cor29
5 Replies
7. Shell Programming and Scripting
Hi to all.
I'm trying to sort this with the Unix command sort.
user1:12345678:3.5:2.5:8:1:2:3
user2:12345679:4.5:3.5:8:1:3:2
user3:12345687:5.5:2.5:6:1:3:2
user4:12345670:5.5:2.5:5:3:2:1
user5:12345671:2.5:5.5:7:2:3:1
I need to get this:
user3:12345687:5.5:2.5:6:1:3:2... (7 Replies)
Discussion started by: daniel.gbaena
7 Replies
8. UNIX for Dummies Questions & Answers
Hi all.
I have 2 files like this:
f1
A 10
B 80
C 9
f2
A 11
B 700
C 10
What I want is the concatenation of the two files sorted by name (alphabetically) and size (numerically), so the result should be like this:
F3 (cat f1 f2 sorted)
A 10
A 11
B 80
B 700 (2 Replies)
Discussion started by: mrodrig
2 Replies
9. UNIX for Dummies Questions & Answers
I have a list of people in a usage log and need to print the names and phone numbers of people with over 500 logins. I'd also like to display these names alphabetically.
I have their total logins set to a variable named total.
So far, I have very little in my awk script to do this:
FS=":"... (4 Replies)
Discussion started by: doubleminus
4 Replies
10. Shell Programming and Scripting
infile:
z y x
c b a
desired output:
x y z
a b c
I don't want to sort the lines into this:
a b c
x y z
nor this:
c b a
z y x
The number of fields per line and number of lines is indeterminate. The field separator is always a space.
Thanks for the use of your collective brains.... (11 Replies)
Discussion started by: H2OBoodle
11 Replies