Shel program file handling


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shel program file handling
# 15  
Old 02-13-2008
what is u r awk version ?????? asort is a GNU awk extension ... as already told by radoulov .
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to simulate ''Esc'' keystroke in a bash shel script?

I am using Ubuntu 12.4 I am running the following script: ++++++++ #!/bin/bash while ; do xdotool mousemove 248 539 click 1 & sleep 3 done +++++++++ This moves the mouse on the specified position on the screen and clicks that pauses the script for 3 seconds and repeats the... (2 Replies)
Discussion started by: alfarnume
2 Replies

2. Solaris

How to create core through program at the time of crash by handling signals?

I am in process of writing a library which can make any application of my product capable of creating core in the application's log folder with a product friendly core file name programatically. In my library I am registering for certain signals e.g. SIGILL, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGABRT... (5 Replies)
Discussion started by: rajeev_ks
5 Replies

3. AIX

How to create core through program at the time of crash by handling signals?

I am in process of writing a library which can make any application of my product capable of creating core in the application's log folder with a product friendly core file name programatically. In my library I am registering for certain signals e.g. SIGILL, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGABRT... (1 Reply)
Discussion started by: rajeev_ks
1 Replies

4. Homework & Coursework Questions

need help with a shel script plzz

hey how u doing guys ... I'm a student @ EMU and taking a beginner Linux class and I have those two extra credit project that im struggling with so I hope to get some correction and help write a shell script that will 1-prompt the user for a file name 2-check to see if the file exists... (2 Replies)
Discussion started by: flyman
2 Replies

5. Programming

Please help:program hang stuck there signal handling on POSIX Message Queue UNIX C programming

in a single main() function,so need signal handling. Use Posix Message Queue IPC mechanism , can ignore the priority and other linked list message,to implement the scenario: client:Knock Knock server:who's there client: Eric Server:Eric,Welcome. client:exit all process terminated ... (1 Reply)
Discussion started by: ouou
1 Replies

6. UNIX for Advanced & Expert Users

File handling

my input for a script is another csv file but in that file say 7 lines are there ... how can i get line by line to that input for example : >cat link.csv www.yahoo.com,yahoo www.google.com,google www.unix.com,unix another file in that file i need to ping the above links ... (2 Replies)
Discussion started by: ponmuthu
2 Replies

7. Shell Programming and Scripting

need some clarification on for loop in shel script

for ( ( $i=0 ; $i<=6 ; $i++ ) ) do p=/RSA-Data/PE-data00"${i}" echo "$p" done --- i need output as below /RSA-Data/PE-data000 . . . /RSA-Data/PE-Data006 (1 Reply)
Discussion started by: mail2sant
1 Replies

8. UNIX for Advanced & Expert Users

File Handling

Hi, I have a log file which runs into 3 to 5 GB. We store this typically for 6 months. When a new month starts we move the previous month into a 9 month back up log (file.9m) and delete the last month of the 9 month back up. Iam using awk to find the data and cat to join the files like... (3 Replies)
Discussion started by: baanprog
3 Replies

9. Shell Programming and Scripting

remotely installing apache server using Shel scripting

Hi guys, I am trying to install apache server onto a remote machine. I file transferred the .gz file and extracted it on the remote server using shell scripts. Then I used the make and make install commands. Everything worked fine until now. I know that i had to change the httpd.conf... (2 Replies)
Discussion started by: tadi18
2 Replies

10. Shell Programming and Scripting

Shel Script doesn't work from Exceed

Hi, I am using this script to load up my Oracle Databases, but when I log in through Exceed, it hangs. Can anyone tell me what else I need to add to make this work?? Details ****************************************************************************************************... (11 Replies)
Discussion started by: dnkansah
11 Replies
Login or Register to Ask a Question
asort(1)						      General Commands Manual							  asort(1)

NAME
asort - Sorts or merges files and supports multiple collating weight sequences SYNOPSIS
asort [-m] [-o output_file] [-Abdfinruv] [-Ccollate_sequence] [-k keydef]... [-t character] [-T directory] [-y] [kilobytes] [-z record_size]... file... asort -c [-u] [-Abdfinruv] [-Ccollate_sequence] [-k keydef]... [-t character] [-T directory] [-y] [kilobytes] [-z record_size]... file... The following syntax is maintained for backward compatibility but may be withdrawn in a future release: asort [-Abcdfimnruv] [-Ccol- late_sequence] [-o output_file] [-t character] [-T directory] [-y] [kilobytes] [-z record_size] [+fskip] [.cskip] [-fskip] [.cskip] [-bdfinr]... file... OPTIONS
The asort command includes the same options as the sort command (see sort(1)) in addition to the following options: Specifies the collating weight sequence to be used in sorting the data files. When this option is specified, the asort command does not use the collating table from the locale database. Instead, the command uses a set of special system and user collating tables to determine the collating weights of characters, including user-defined characters (UDCs). The collate_sequence argument can be in long form (for example, "Pinyin Radical Stroke") or short form (for example, prs). The code- set of the locale determines which collation weight names can be specified for collate_sequence. The following list specifies the long and short collation weight names that are valid for supported codesets. For DEC Hanzi: Pinyon (or p) Radical (or r) Stroke (or s) For DEC Hanyu, Taiwanese EUC, and BIG-5: Phonetic (or p) Radical (or r) Stroke (or s) Uses a breadth-first sorting mechanism instead of the default depth-first mechanism to sort the input data. To have any effect, the -v option must be used together with the -C option. DESCRIPTION
The asort command sorts lines in its input files and writes the result to standard output. The asort command is similar to the sort com- mand. See the sort(1) reference page for information about features the two commands have in common. The asort command provides additional features for processing multiple collating weight sequences used with Asian languages, such as Chi- nese. For example, pinyon (p), stroke (s), and radical (r) are three dimensions along which characters can be ordered in Simplified Chi- nese. The -C option allows users to specify the priority level that these dimensions have during sorting. For example, -C srp specifies that characters should be sorted first by stroke, then by radical, then by pinyon. The specified sequence is applied to user-defined char- acters (UDCs) as well as to standard characters. When the -C option is specified, the default behavior of the asort command is to use a depth-first sorting mechanism to sort the input files. With the depth-first mechanism, pairs of multibyte characters in a sort field are compared by exhausting all the specified collat- ing weights and/or internal codes one at a time until the collating order is resolved. Only when two characters are identical is the next pair of characters compared. The depth-first sorting mechanism is also called character sorting. However, the asort command provides the -v option to use the Asian VMS-like breadth-first sorting mechanism. With the breadth-first mecha- nism, pairs of multibyte characters in a sort field are compared using the first collating weight for all the characters in the sort field first. Only when two sets of data in a sort field are computed to have the same collating order are succeeding collating weights used for resolving the collating order. The breadth-first sorting mechanism is sometimes called string sorting. NOTES
Currently, the asort command is supported for use only with Chinese codesets. EXIT STATUS
The asort command returns the following exit values: All input files were output successfully, or -c was specified and the input file was correctly sorted. If -c was specified, the file was not ordered as specified, or if the -c and -u options were both specified, two input lines were found with equal keys. An error occurred. EXAMPLES
Unless stated otherwise, the following examples assume the locale setting is zh_TW.dechanyu: To perform character sorting first by stroke and then by radical, enter: asort -C"Stroke Radical" names This command displays the lines in names sorted in ascending order according to the number of strokes in characters. If the number of strokes happen to be the same for two characters, the radicals of the characters determine how the characters are ordered.An alternative short form of the same command is as follows: asort -Csr names To perform string sorting first by stroke and then by radical in a way similar to the sort command available on an Asian VMS system, enter: asort -v -C"Stroke Radical" names SEE ALSO
Commands: sort(1) Functions: setlocale(3) Files: locale(4) Others: Chinese(5), i18n_intro(5) asort(1)