Sponsored Content
Full Discussion: sort script/command
Top Forums UNIX for Dummies Questions & Answers sort script/command Post 89735 by Chadbot on Tuesday 15th of November 2005 12:06:36 PM
Old 11-15-2005
sort script/command

ok.

i am doing a project where i have hand typed in the titles of nearly 500 DVD titles, each one is on a seperate line.
but they arent in any type of alphebetical order, and i need them sorted in that format (A-Z or a-z) .....

i know that the 'sort' command can be used but also know the output is gonna come out all wacky due to titles that start with 'the' or 'a' .

if ANYONE could help i really appreciate it a lot.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sort command

i am wondering is it possible to sort a file by day of the week for example if the file is name oncall-date phone number john wednsday 00000000 jane tuesday 00000000 alice monday 00000000 kevin thursday 00000000 can it be sorted... (1 Reply)
Discussion started by: melkor
1 Replies

2. UNIX for Dummies Questions & Answers

the sort command

Explain the output of the command “sort -rfn file1 | more”. (0 Replies)
Discussion started by: wickbc
0 Replies

3. Shell Programming and Scripting

Unable to use sort command in Shell Script

Hello All, I am creating a shell script that reads a file(test.txt) with the following data, 0.0.0.0 10.10.10.0 10.10.10.1 10.10.10.10 10.10.10.2 10.10.10.3 10.10.10.4 10.10.10.5 10.10.10.6 10.10.10.7 10.10.10.8 10.10.10.9 If I use the sort, the highest value I am getting is... (1 Reply)
Discussion started by: racbern
1 Replies

4. Shell Programming and Scripting

How to Sort Floating Numbers Using the Sort Command?

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

5. UNIX for Dummies Questions & Answers

sort command ... can I

Hi All, Simple question. I have a file (assumed unsorted) - can I sort said file but ignore the first two lines of the same said file (header lines) ?? Yes/No will suffice. If Yes - will keep searching. Cheers, Cam (7 Replies)
Discussion started by: Cameron
7 Replies

6. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

7. Shell Programming and Scripting

Is it Possible to sort a list of hexadecimal numbers using "sort" command?

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

8. Shell Programming and Scripting

Help to sort out... Possible use of sort command

I have an input like 4.3.6.66 4.3.6.67 4.3.6.70 4.3.6.25 4.3.6.15 4.3.6.54 4.3.6.44 4.3.6.34 4.3.6.24 4.3.6.14 4.3.6.53 4.3.6.43 4.3.6.49 4.3.6.33 4.3.6.52 4.3.6.19 4.3.6.58 4.3.6.42 (5 Replies)
Discussion started by: dnam9917
5 Replies

9. UNIX for Beginners Questions & Answers

Wget, grep, sort, sed in 1 command/script

Hi, I need to join these statements for efficiency, and without having to make a new directory for each batch. I'm annotating commands below. wget -q -r -l1 URL ^^ can't use -O - here and pipe | to grep because of -r grep -hrio "\b\+@\+\.\{2,4\}\+\b" * > first.txt ^^ Need to grep the output... (14 Replies)
Discussion started by: p1ne
14 Replies
gather_stx_titles(1)					      General Commands Manual					      gather_stx_titles(1)

NAME
gather_stx_titles - gather title declarations from Stx documents SYNOPSIS
gather_stx_titles [ -f from-suffix ] [ -t to-suffix ] [ m4 options ] file [ file ... ] DESCRIPTION
gather_stx_titles digs out Stx metadata declarations from the listed files, and dumps the title and document ID information as m4 defini- tions into standard output. This information can later be used by w_crosslink to link the documents by their metadata. Why is this useful? Well, imagine that you have a large site with a lot of cross-linking. A document's name will appear in many places: in the link menu (if you have one), and in the body of different pages where it is cross-linked from. gather_stx_titles lets you put all the information in one place and where it belongs, i.e. the file itself. You'll be glad if you did, when the time comes to change document titles or move the documents around; especially so if your website has multilingual magic. OPTIONS
gather_stx_titles uses m4 internally and will accept any option m4 accepts. In addition to those, it takes the following options: -f from-suffix In the filename data, substitute away the suffix from-suffix. Actually, from_suffix may be a regular expression; stupid but true, in GNU m4 it is a "traditional" regexp, whereas in BSD m4 it is an "extended" regexp. Default to no suffix (nothing to take away). -t to-suffix In the filename data, substitute the suffix taken away by from-suffix with to-suffix. If from-suffix is nil (the default), append to-suffix to all filenames. -p prefix Strip away the prefix given by (regular expression) prefix from filenames. The equivalent of -t for this does not exist, because you can specify a directory prefix to w_crosslink by w_base. --version, -V Just show version information and exit. --help, -? Just show a short help message and exit. EXAMPLES
I guess most of the time you will want to automate the use of gather_stx_titles, for example with a Makefile like this: SOURCES = $(wildcard *.stx) TARGETS = $(SOURCES:.stx=.html) all: $(TARGETS) titles.m4: $(SOURCES) gather_stx_titles -f stx -t html $^ > $@ %.html: %.stx titles.m4 stx2any -T html titles.m4 $< > $@ If you don't want to be quite so correct, drop the .html dependency on titles.m4 or titles.m4 dependency on SOURCES. Using temporary files is not necessary: this should also work: $ gather_stx_titles *.stx | stx2any - mydoc.stx SEE ALSO
stx2any (1). AUTHOR
This page is written by Panu A. Kalliokoski. Panu A. Kalliokoski gather_stx_titles(1)
All times are GMT -4. The time now is 08:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy