10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have the below input data in a file and need to get the output as mentioned below. Need to sort the data by size(Asc/des)/by subdirectory
Below is the input which is there in a file:
120 /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json
532 ... (3 Replies)
Discussion started by: ajarramuk
3 Replies
2. UNIX for Dummies Questions & Answers
Experts
I have a list of files in the directory
mysample1
mysample2
mysample3
mysample4
mysample5
mysample6
mysample7
mysample8
mysample9
mysample10
mysample11
mysample12
mysample13
mysample14
mysample15 (4 Replies)
Discussion started by: dsedi
4 Replies
3. Shell Programming and Scripting
Hi,
I want to be able to sort/print a hash based on the string length of the values.
For example
%hash = (
key1 => 'jeri',
key2 => 'corona',
key3 => 'una,
);
I want to be able to print in the following order (smallest to largest)
una,jeri,corona
OR... (1 Reply)
Discussion started by: jdilts
1 Replies
4. Shell Programming and Scripting
Hi,
I have a list of log files as follows:
name_date_0001_ID0.log
name_date_0001_ID2.log
name_date_0001_ID1.log
name_date_0002_ID2.log
name_date_0004_ID0.log
name_date_0005_ID0.log
name_date_0021_ID0.log
name_date_0025_ID0.log
.......................................... (4 Replies)
Discussion started by: alex2005
4 Replies
5. Shell Programming and Scripting
Right now there is no unix direct commad that can sort the files base on its name having numbers:
We can use the following:
In case your file name are like:
abc-UP018.zip
xyz-UP019.zip
ls *|sort -t'-' -k2 (2 Replies)
Discussion started by: asifansari
2 Replies
6. Shell Programming and Scripting
I am generating a output:
Name Count_1 Count_2
abc 12 12
def 15 14
ghi 16 16
jkl 18 18
mno 7 5
I am sending the output in html email, I want to add the code:
<font color="red"> NAME COLUMN record </font>
for the Name... (8 Replies)
Discussion started by: karumudi7
8 Replies
7. Shell Programming and Scripting
Hi
I have a requirement like below
I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory
My files looks like this
PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies
8. Shell Programming and Scripting
Hi,
I am having trouble sorting one file based on another file. I tried the grep -f function and failed. Basically what I have is two files that look like this:
File 1 (the list)
gh
aba
for
hmm
File 2 ( the file that needs to be sorted)
aba 2 4 6 7
for 2 4 7 4... (4 Replies)
Discussion started by: phil_heath
4 Replies
9. Shell Programming and Scripting
Hi,
I am having trouble sorting one file based on another file. I tried the grep -f function and failed. Basically what I have is two files that look like this:
File 1 (the list)
gh
aba
for
hmm
File 2 ( the file that needs to be sorted)
aba 2 4 6 7
for 2 4 7 4
hmm 1 ... (3 Replies)
Discussion started by: phil_heath
3 Replies
10. UNIX for Dummies Questions & Answers
Hi ,,
i have the below file...
D 2342135
B 214236
C argjlksd
V lskjrghaklsr
C slkrgj
B sdg4tsd
E aslkgjlkasg
i want to sort the lines into different files based on the starting letter of the line. so that i have different files for lines starting with a letter.
thanks (1 Reply)
Discussion started by: jathin12
1 Replies