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. Shell Programming and Scripting
I want to extract dates from the files and i have different types of files with pattern. I have list file with the patterns and want to date extract based on it in a sh script
Files in the directory :
file1_20160101.txt
file2_20160101_abc.txt
filexyz20160101.txt
list file with... (2 Replies)
Discussion started by: lijjumathew
2 Replies
3. 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
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
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
7. 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
8. 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
9. Shell Programming and Scripting
Hi,
I've the following two CSV files:
File1.csv File2.csv
Class,Student# Student#,Marks
1001,6001 6002,50
1001,6002 6001,60
1002,7000 ... (3 Replies)
Discussion started by: Matrix2682
3 Replies
10. Shell Programming and Scripting
How to Sort files based on predefined values.?
Normally Sorting happens for the alphabetic or numberic orders..
Is there any way to sort a fields based on the Field values..?
Field10 has :
one
two
three
five
four
six
ten
seven
eight
nine.
in predefined order { one, two, three,... (2 Replies)
Discussion started by: p_prathaban
2 Replies