라벨이 sort인 게시물 표시

[Powershell] Sort by date modified and select first 10 and show only name

Below is how to sort by date modified and select first 10 and show only name by using Get-ChildItem, Sort, Select-Object in Powershell, Windows. Get-ChildItem | sort LastAccessTime -Descending | Select-Object -First 10 | Select-Object Name

Linux example of sort

sort file : sorting file using first column sort -k 2 file : sorting file using second column sort -r -k 2 file : sorting file using second column in reversal order sort file > file.txt : sorting file and save to file.txt Thanks, JF

Usage of seq, echo, tail, awk, sort, cat for data analysys

for i in `seq 0 1 8` do    cd ${i}/magmom    for j in `seq 0 1 70`    do       echo ${j} `tail -1 OSZICAR_${j}` >> res    done    awk '{print $1, $4}' res >> res.out    sort -k 2 res.out | tail -1 >> min_${i}    cat min_${i} >> ../../mins; cd ../.. done Thanks, JF