05-08-2004
Echo display alignment/sort order
Hi,
My script prints a few varibales as each it reads each line of a text file and then prints them on screen, however iam having problem in aligning and sorting them.
what happens is this
Last First Number
Mark leo 87798798
Andrew rodgers 23789779
i want them all to be aligned accordingly. Also data should be sorted say number 2378 for andrew should come first. I am not displaying a simple text file. This outcome is as the text file is being read and each line is processed . For output this is what iam using :
echo -n "$Last $First $Number"
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
What's the command to sort a file in ascending order and redirect the output to another file?
Thanks!!!!!! (1 Reply)
Discussion started by: gyik
1 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I want to sort a file based on the number in the 9th column
I've tried both of the following commands
sort -k 9,9n file_to_sort.dat
sort +8 -n file_to_sort.dat
both resulting in the same output which does sort col 9 nummerically
but it doesn't output the lines in the original... (2 Replies)
Discussion started by: olga
2 Replies
3. Shell Programming and Scripting
Hi
I'm trying to display the output of my script in a friendly viewable format.
it's something like this..
i have this while loop... in which i get some records from a file where fields are delimitered with a pipe. so i'm extacting each field and replacing the pipe with a \t, tab !!..
cat... (7 Replies)
Discussion started by: rosh0623
7 Replies
4. UNIX for Dummies Questions & Answers
hi,
i want to rename all the file names in order so that they can be sorted later.
For example, my filenames are like path\1, path\2...path\10, path\11.
But when I sort them, it sorts by the first number, so path\1 gets sorted with path\10.
I'm guessing the best way to do this is to rename... (5 Replies)
Discussion started by: gammaman
5 Replies
5. Shell Programming and Scripting
I a file with log entries... I want to sort it so that the last line in the file is first and the first line is last..
eg.
Sample file
1
h
a
f
8
6
After sort should look like
6
8
f
a
h
1 (11 Replies)
Discussion started by: frustrated1
11 Replies
6. Shell Programming and Scripting
I am converting mainframes JCL to be used in shell on a one to one basis... when i use the sort command unix does ascii sort as a result which numbers are first followed by charecters in the Ascending sort ... but themainframes uses the EBCDIC as result gives the charecters followed by numbers in... (5 Replies)
Discussion started by: bourne
5 Replies
7. UNIX for Dummies Questions & Answers
I need to sort the particular column only in reverse order how i can give it..
if i give the -r option the whole file is getting sorted in reverse order.
1st 2nd col 3rd
C col 4th col 5th col
-------------------------------------------
C... (7 Replies)
Discussion started by: sivakumar.rj
7 Replies
8. Shell Programming and Scripting
Hi
I am using this
cat substitutionFeats.txt | gawk '{$0=gensub(/\t/,"blabla",1);print}' | gawk '{print length, $0}' | sort -n | sort -r
and the "sort -n" command doesn't work as expected: it leads to a wrong ordering:
64 Adjustable cuffs
64 Abrasion-
64 Abrasion pas
647 Sanitized 647... (4 Replies)
Discussion started by: louisJ
4 Replies
9. Shell Programming and Scripting
Hello all
I was wondering if someone has an idea how to sort by a specific order, let's say by a specific alphabet containing only 4 letters like (d,s,a,p) instead of (a,b,c....z) ??
Cheers! (6 Replies)
Discussion started by: cabrao
6 Replies
10. UNIX for Beginners Questions & Answers
I am trying to sort a log file in chronological order to identify which ones did not process and still have an old (probably yesterday's) date. This is a sample of the file:flatf 010140 flatf Thu May 10 22:22:11 CST 2018 flats finished
flatf 010142 flatf Thu May 10 22:31:25 CST 2018 flats... (4 Replies)
Discussion started by: wbport
4 Replies
LEARN ABOUT LINUX
ljlatest
ljlatest(6x) XScreenSaver manual ljlatest(6x)
NAME
ljlatest - prints the most recent public posts on livejournal.com.
SYNOPSIS
ljlatest [--verbose] [--columns N]
DESCRIPTION
The ljlatest script reads the most recent public posts made to livejournal.com, and prints them on stdout, after doing a rudimentary con-
version of HTML to plain text.
This script is just a wrapper around
xscreensaver-text
--url http://www.livejournal.com/stats/latest-rss.bml
As of XScreenSaver 4.21, you can just use use above URL in the "Text URL" field on the "Advanced" tab in xscreensaver-demo(1).
BUGS
This program makes it seem like morons have invaded your screen saver.
The output is always ISO-8859-1, regardless of locale.
SEE ALSO
http://www.livejournal.com/, xscreensaver(1), xscreensaver-text(1), fortune(1), phosphor(6x), apple2(6x), starwars(6x), fontglide(6x),
dadadodo(1), webcollage(6x), driftnet(1) EtherPEG, EtherPeek
COPYRIGHT
Copyright (C) 2003, 2005 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for
any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.
AUTHOR
Jamie Zawinski <jwz@jwz.org>, 30-Aug-2003.
X Version 11 5.15 (28-Sep-2011) ljlatest(6x)