Sponsored Content
Top Forums Shell Programming and Scripting Sorting on length with identification of number of characters Post 302758427 by Scrutinizer on Saturday 19th of January 2013 08:17:07 AM
Old 01-19-2013
Try:
Code:
gawk '{print length, $1}' infile | sort -n | gawk '$1!=p{print $1}{print $2; p=$1}'

You would need to use a version of awk that correctly counts multi-byte characters:
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

Is the Length of User ID for AIX Limit to 8 Characters?

Hi, I'm using AIX version 5.3 currently. I'm trying to create a user id, e.g. andyleong, which the system prompted the length is too long. 1. I would like to know is that the length of user id is limited to maximum 8 characters for AIX. 2. Is it apply to all versions of AIX? If no... (2 Replies)
Discussion started by: meihua_t
2 Replies

2. UNIX for Dummies Questions & Answers

Conditional sorting on fixed length flat file

I have a fixed length file that need to be sorted according to the following rule IF B=1 ORDER by A,B Else ORDER by A,C Input file is ABC 131 112 122 231 212 222 Output needed ABC 112 131 122 212 231 222 (1 Reply)
Discussion started by: zsk_00
1 Replies

3. 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

4. Shell Programming and Scripting

Search and replace particular characters in fixed length-file

Masters, I have fixed length input file like FHEAD0000000001XXXX20090901 0000009000Y1000XXX2 THEAD000000000220090901 ITM0000109393813 430143504352N22SP 000000000000RN000000010000EA P0000000000000014390020090901 TTAIL0000000003000000 FTAIL00000000040000000002 Note... (4 Replies)
Discussion started by: bittoo
4 Replies

5. UNIX for Dummies Questions & Answers

Sorting words based on length

i need to write a bash script that recive a list of varuables kaka pele ronaldo beckham zidane messi rivaldo gerrard platini i need the program to print the longest word of the list. word in the output appears on a separate line and word order in the output is in the order Llachsicografi costs.... (1 Reply)
Discussion started by: yairpg
1 Replies

6. Shell Programming and Scripting

Remove characters from fixed length file

Hello I've question on the requirement I am working on. We are getting a fixed length file with "33" characters long. We are processing that file loading into DB. Now some times we are getting a file with "35" characters long. In this case I have to remove two characters (in 22,23... (14 Replies)
Discussion started by: manasvi24
14 Replies

7. Shell Programming and Scripting

Need to find lines where the length is less than 50 characters

Hi, I have a big file say abc.csv. And in that file, I need to find lines whose length is less than 50 characters. How can it be achieved? Thanks in advance. Thanks (4 Replies)
Discussion started by: Gangadhar Reddy
4 Replies

8. Shell Programming and Scripting

Sorting by length

Hello, I have a very large file: a dictionary of headwords of around 40000 and would like to have the dictionary sorted by its length i.e. the largest string first and the smallest at the end. I have hunted for a perl or awk script on the forum which can do the job but there is none available. I... (8 Replies)
Discussion started by: khoremand
8 Replies

9. Shell Programming and Scripting

Sorting a file with frequency on length

Hello, I have a file which has the following structure word space Frequency The file is around 30,000 headwords each along with its frequency. The words have different lengths. What I need is a PERL or AWK script which can sort the file on length of the headword and once the file is sorted on... (12 Replies)
Discussion started by: gimley
12 Replies

10. Shell Programming and Scripting

Checking the user input in perl for characters and length

My question is basically as the title says. How can I check a user inputted string is only certain characters long (for example, 3 characters long) and how do I check a user inputted string only contains certain characters (for example, it should only contain the characters 'u', 'a', 'g', and 'c')... (4 Replies)
Discussion started by: Eric1
4 Replies
javaws(1)						      General Commands Manual							 javaws(1)

NAME
javaws - Java Web Start launcher command SYNOPSIS
javaws [ options ] [ URL ] PARAMETERS
options Command-line options. Options many be in any order. For a discussion of the various options, see OPTIONS below. URL Uniform Resource Locator (URL) of the JNLP (Java Network Launching Protocol) file. DESCRIPTION
The javaws command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches java application/applets hosted on a network. Without any options javaws will launch the Java JNLP Application Manager, from which users can launch applications/applet or configure Java Web Start. If a URL for a JNLP file is specified, javaws will launch the Java application/applet specified in the JNLP file. OPTIONS
The javaws launcher has a set of options that are supported in the current release. However, the options may be removed in a future release. All -X options are non-standard and subject to change. -offline Runs Java Web Start in offline mode. -uninstall URL Removes a specific application/applet from the user's cache, as indicated by the URL for the JNLP file. Java Web Start will exit after the command has completed. -updateVersions Updates the Java Web Start configuration file based on the current machine's settings. Java Web Start will exit when the command is completed. -Xclearcache Clears the user's cache. Java Web Start will exit after the command has completed. -Xnosplash Disables the display of the initial splash screen. -import Imports the application specified by the URL into the user's cache but does not run it.. -silent When used with the -import option, imports in silent mode; i.e., there will be no UI pop up. The process exit code will be either 0 if successful or 1 if not. -codebase URL Replaces the codebase with URL in the jnlp file specified when importing the resources. URL must be a valid URL. -system Uses the system cache instead of the user cache. -shortcut Allows the creation of shortcuts during silent import. -association Allows the creation of associations during silent import. -open arguments If specified, replaces the arguments in the jnlp file with -open arguments. -print arguments If specified, replaces the arguments in the jnlp file with -print arguments. -online Runs in online mode (default behavior). -viewer Runs the Java Application Cache Viewer (default if no URL is specified). -userConfig property-name Clears the specified deployment property. -userConfig property-name property-value Sets the specified deployment property to the specified value. -wait If specified, the javaws process will not exit until the application exits. FILES
For more information about the user and system cache and deployment.properties files, see http://java.sun.com/j2se/1.5.0/docs/guide/deploy- ment/deployment-guide/properties.html MORE INFORMATION
For more information about Java Web Start, see http://java.sun.com/j2se/1.5.0/docs/guide/javaws/index.html. 09 April 2004 javaws(1)
All times are GMT -4. The time now is 09:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy