Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sorting of alphanumeric filenames.. Post 302595012 by itkamaraj on Wednesday 1st of February 2012 10:55:05 PM
Old 02-01-2012
Code:
$ nawk -F"file" '{print $1 "file " $2}' input.txt | sort -k2 -n | sed 's/ //'
exp_installer_CC4160-file1.dmp
exp_installer_CC4160-file2.dmp
exp_installer_CC4160-file3.dmp
exp_installer_CC4160-file4.dmp
exp_installer_CC4160-file5.dmp
exp_installer_CC4160-file6.dmp
exp_installer_CC4160-file7.dmp
exp_installer_CC4160-file8.dmp
exp_installer_CC4160-file9.dmp
exp_installer_CC4160-file10.dmp 
exp_installer_CC4160-file11.dmp 
exp_installer_CC4160-file12.dmp
exp_installer_CC4160-file13.dmp
exp_installer_CC4160-file14.dmp
exp_installer_CC4160-file15.dmp
exp_installer_CC4160-file16.dmp
exp_installer_CC4160-file20.dmp 
exp_installer_CC4160-file22.dmp

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Sorting filenames by order in another file

I would like to arrange /sort filenames ending with suffix like ".00XXXX". where X is a digit. However the order of arrangement is in a text file and is 'harpharzard'. e.g the text file may be like 002345 009807 001145 I wanted to avoid doing this using sql and exporting the text file back to... (4 Replies)
Discussion started by: samudimu
4 Replies

2. Shell Programming and Scripting

sort command - alphanumeric

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

3. UNIX for Dummies Questions & Answers

AlphaNumeric String Operations

Hi :) I am writing a ksh I have a string of general format A12B3456CD78 the string is of variable length the string always ends with numbers (here it is 78.. it can be any number of digits may be 789 or just 7) before these ending numbers are alphabets (here it is CD can even be... (3 Replies)
Discussion started by: lakshmikanth
3 Replies

4. Shell Programming and Scripting

alphanumeric comparision

I have a requirement where I need to check if where r1v07l09ab is a software release. I should always check for this to be true to continue the release deployment because an older release should not be deployed by mistake. I mean only the release greater than the current release should be... (3 Replies)
Discussion started by: rakeshou
3 Replies

5. UNIX for Advanced & Expert Users

alphanumeric Sorting

Hi , I have a requirement where one column have to be sorted (delimiter is pipe) for eg: My input filed is as below 1|FIAT|0010103|23011|01/01/2000|31/12/9999|1.15 2|232|613|1 2|234|743|1 2|234|793|1 2|234|893|1 1|FIAT|0010103|23012|01/01/2000|31/12/9999|1.15 2|230|006|0 2|230|106|0... (9 Replies)
Discussion started by: laxmi131
9 Replies

6. Shell Programming and Scripting

Sorting with non- and alphanumeric characters

Hi guys, I'm new to this forum and I'm not a UNIX expert. I can't figure out this certain problem i'm having: I need to sort some words, some of the words are annotations (enclosed within < and >). I need to have them sorted alphabetically with all non-alphanumeric characters up front. For... (2 Replies)
Discussion started by: fed.m.ang
2 Replies

7. Shell Programming and Scripting

get rid of non-alphanumeric characters

Hi! Could anyone so kindly help me a code to eliminate from a txt file, obtained by collecting and merge several web-page, every word (string) containing non alphabetical, numeric and punctuation character (i.e NON a-zA-Z0-9, underscore and punctuation mark)? Thanks a lot for the help to... (5 Replies)
Discussion started by: mjomba
5 Replies

8. Shell Programming and Scripting

Alphanumeric to integer

Hi folks, I have a value like A12,i could able to change this into integer using typeset as below typeset -i A12 But, I need your advice to change the values like 1A2 or 12A into integer. Thanks in advance. Thanks, Sathish (3 Replies)
Discussion started by: bsathishmca
3 Replies

9. Shell Programming and Scripting

Sorting a list of filenames but keeping the path information.

Hi All I've googled around for this and can't see a way of doing it. I have a file that contains a number of records that are layed out something like the following. /path/to/directory/that/contains/a/file/I/need/filename.pdf The path itself can vary both in terms of the names and the... (7 Replies)
Discussion started by: Bashingaway
7 Replies

10. Shell Programming and Scripting

Sorting alphanumeric strings without a pattern

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
jfs_logdump(8)						  JFS utility - journal log dump					    jfs_logdump(8)

NAME
jfs_logdump - dump a JFS formatted device's journal log SYNOPSIS
jfs_logdump [ -a ] device DESCRIPTION
jfs_logdump dumps the contents of the journal log from the specified JFS formatted device into output file ./jfslog.dmp. device is the special file name corresponding to the actual device from which the journal log will be dumped (e.g. /dev/hdb1 ). jfs_logdump must be run as root. OPTIONS
-a Dump the entire contents of the journal log instead of just the committed transactions since the last synch point. EXAMPLE
Dump the entire JFS journal log from the 3rd partition of the 2nd hard disk into ./jfslog.dmp: jfs_logdump -a /dev/hdb3 REPORTING BUGS
If you find a bug in JFS or jfs_logdump, please report it via the bug tracking system ("Report Bugs" section) of the JFS project web site: http://jfs.sourceforge.net/ Please send as much pertinent information as possible, including any jfs_logdump error messages and the complete output of running jfs_fsck with the -v option on the JFS device. SEE ALSO
jfs_fsck(8), jfs_mkfs(8), jfs_fscklog(8), jfs_tune(8), jfs_debugfs(8) AUTHORS
Barry Arndt (barndt@us.ibm.com) William Braswell, Jr. jfs_logdump is maintained by IBM. See the JFS project web site for more details: http://jfs.sourceforge.net/ October 29, 2002 jfs_logdump(8)
All times are GMT -4. The time now is 02:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy