Sponsored Content
Top Forums Shell Programming and Scripting filter and get the latest order number Post 302110446 by anbu23 on Tuesday 13th of March 2007 04:32:18 AM
Old 03-13-2007
Whats the criteria to get the latest order number ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

adding order number in the output file

Hello, I have a list of all order number like below: maryu01001 johnm00003 peter02234 catmy66751 For the above, all number must in 5 digits and I need to add one into the number and output a new list like below: maryu01002 johnm00004 peter02235 catmy66752 How can write a... (20 Replies)
Discussion started by: happyv
20 Replies

2. Shell Programming and Scripting

List number in decending order using AWK

Hi All, Can anyone show me how to list the below numbers in decending order? I have a code to find out whats the largest number though but can it be modified to in-corporate in function ? Thanks in advance Input: 20 30 10 40 50 Output: 50 40 30 20 (2 Replies)
Discussion started by: Raynon
2 Replies

3. Shell Programming and Scripting

Regarding about the print line number/order

Hello, I am trying to print line number/order using this command awk '{print $0, FNR}' myfilename 11006 A41 1888 11006 A41 1888 11006 A41 1888 11006 A41 ... (2 Replies)
Discussion started by: davidkhan
2 Replies

4. Shell Programming and Scripting

Counts a number of unique word contained in the file and print them in alphabetical order

What should be the Shell script that counts a number of unique word contained in a file and print them in alphabetical order line by line? (7 Replies)
Discussion started by: proactiveaditya
7 Replies

5. Shell Programming and Scripting

Help in writing a KSH script to filter the latest record?

Hi All, I have a text file with the folowing content. BANGALORE|1417|2010-02-04 08:41:04.174|dob|xxx BANGALORE|1416|2010-02-04 08:23:19.566|dob|yyy BANGALORE|1415|2010-02-04 08:20:14.497|dob|aaa BANGALORE|1414|2010-02-04 08:19:40.065|dob|vvv BANGALORE|1413|2010-02-04... (4 Replies)
Discussion started by: Karpak
4 Replies

6. Shell Programming and Scripting

Filter certain number of alphabets

filter the ones (ex:>1279_17_27_F3) that have 50letters (ABABABACACACACACAADADADADABABABABAACACACACACACAACAC) in input. And others that are less than 50 have to be ignore and the ones with more than 50 have to trimmed to first 50 letters. Thanx >1279_16_1960_F3 A >1279_16_2010_F3 BCCC... (2 Replies)
Discussion started by: ruby_sgp
2 Replies

7. Shell Programming and Scripting

[ask]filter with line number in file

dear all about my last question in fileA.txt (all list line i want to find in fileB.txt) is content of line number fileA.txt 23 34 35 55 59 and fileB.txt is content like 24:asd|ekkk|001|001 123:bca|egsd|210|002 1231:cas|egds|322|231 ... in fileB.txt they have line number like... (5 Replies)
Discussion started by: zvtral
5 Replies

8. Shell Programming and Scripting

script for remove descending order number

hi all i want to remove some descending order number example : 1 100 200 135.00 Gk_wirs 1 1 100 200 136.00 Gk_wirs 50 1 110 210 138.00 Gk_wirs 60 1 100 200 136.00 Gk_wirs 57 ----> how to remove... (6 Replies)
Discussion started by: nithyanandan
6 Replies

9. Shell Programming and Scripting

Parsing log file and print latest number in loop

Hello All, I have an awk script which parses my log file and prints number grepping from a specific line/pattern, now i have to come with a shell script to continue reading the log untill the job is completed, which i would know while reading session log untill process encounters a final... (1 Reply)
Discussion started by: Ariean
1 Replies

10. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies
popen(3)						     Library Functions Manual							  popen(3)

Name
       popen, pclose - initiate I/O to/from a process

Syntax
       #include <stdio.h>

       FILE *popen(command, type)
       char *command, *type;

       pclose(stream)
       FILE *stream;

Description
       The arguments to are pointers to null-terminated strings containing respectively a shell command line and an I/O mode, either "r" for read-
       ing or "w" for writing.	It creates a pipe between the calling process and the command to be executed.  The  value  returned  is  a  stream
       pointer that can be used (as appropriate) to write to the standard input of the command or read from its standard output.

       A stream opened by should be closed by which waits for the associated process to terminate and returns the exit status of the command.

       Because open files are shared, a type "r" command may be used as an input filter, and a type "w" as an output filter.

Diagnostics
       The routine returns a null pointer if files or processes cannot be created, or the shell cannot be accessed.

       The routine returns -1 if stream is not associated with a `popened' command.

Restrictions
       Buffered reading before opening an input filter may leave the standard input of that filter mispositioned.  Similar problems with an output
       filter may be forestalled by careful buffer flushing, for instance, with For further information, see

       The routine always calls and never calls

See Also
       sh(1), pipe(2), wait(2), system(3), fclose(3s), fopen(3s)

																	  popen(3)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy