Sponsored Content
Top Forums Shell Programming and Scripting cut a field, but with reverse order Post 302365413 by daptal on Tuesday 27th of October 2009 02:05:59 AM
Old 10-27-2009
If you are thinking of using perl then you donot need to use reverse split either

Code:
cat abc.txt
a b 001 c
b b 002 c
c c, not 002 c

Code:
~$ cat abc.txt | perl -e 'while(<>){ my @cols  = split; print "$cols[-2]\n";}'
001
002
002

HTH,
PL
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using sed and regex to reverse order???

so i have been trying to learn how to manipulate text on my own and have gotten stumped... let's say i have a text file that says (highly simplified): people ordinary How would swap the order of the words.. I know i need to use sed and some kind of back reference but cannot make it... (2 Replies)
Discussion started by: urtherhoda
2 Replies

2. Shell Programming and Scripting

sort a file in reverse order

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

3. UNIX for Dummies Questions & Answers

sort -reverse order

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

4. Shell Programming and Scripting

How to get fields in reverse order?

i am having lines like below seperated by "|" (pipe) abc|xyz 123|567 i have to get the above in reverse order xyz|abc 567|123 Pls help (5 Replies)
Discussion started by: suryanarayana
5 Replies

5. UNIX for Dummies Questions & Answers

How to print arguments in reverse order?

Hey all, How do I make a script print its arguments in reverse order? Thanks (5 Replies)
Discussion started by: unclepickle1
5 Replies

6. UNIX for Dummies Questions & Answers

printing fields in reverse order

command/script(apart from awk) to print the fields in reverse order that is last field has to come first and so on and first field has to go last Input store-id date sale ............. ............. ... (3 Replies)
Discussion started by: tsurendra
3 Replies

7. Shell Programming and Scripting

print in reverse order

Hi, I want to print the item in reverse order such that the output would look like 00 50 50 23 40 22 02 96 Below is the input: 00 05 05 32 04 22 20 69 Video tutorial on how to use code tags in The UNIX and Linux Forums. (5 Replies)
Discussion started by: reignangel2003
5 Replies

8. Shell Programming and Scripting

Delete records in reverse order

Hi all, i have dynamic file 'xyz.txt', records always look likes below format ... 0000021 RET 31-MAR-1984 FAP 0000021 DTA 14-JAN-2003 CNV 0000021 DTA 25-MAR-2012 DTA 0000021 DTA 26-MAR-2012 DTA ################################################# 0000021 DTA ... (4 Replies)
Discussion started by: krupasindhu18
4 Replies

9. UNIX for Beginners Questions & Answers

Issues with sorting in reverse order

I have a unix script that outputs a summary file to the mac desktop. The file is called summary.txt I am trying to configure such so that the summary.txt file lists the content contained within such in reverse sort order. I have used sort -r but it does not seem to work. I would be... (8 Replies)
Discussion started by: Braveheart
8 Replies
ALE(1)                                                                                                                                      ALE(1)

NAME
ale - a synthetic capture engine and renderer SYNOPSIS
ale [OPTIONS] original-frame [supplemental-frames ...] output-file ale [HELP OPTIONS] ale --version DESCRIPTION
ALE is a free software synthetic capture engine and renderer accepting, as input, a sequence of image frames, and producing, as output, rendered images, registration data, and 3D models (currently experimental). EXAMPLES
ale --hu Print the help page on program usage. ale 001.ppm 002.ppm 003.ppm out.ppm Render output file out.ppm from inputs 001.ppm, 002.ppm, and 003.ppm. ale --scale 2 001.ppm 002.ppm 003.ppm out.png Render output file out.png at 2x scale. ale --perturb-upper=0 --trans-load=a.t --projective frame*.png out.png Render output file out.png from inputs frame*.png, using projective transformations as described in the file a.t. ale --3dv 0 out.png --projective frame*.png null: Render output file out.png from inputs frame*.png, using a 3D scene model to determine transformations. ale --visp last:sinc*lanc:6 sf:0 out/ .jpg in/*.jpg null: Render a video stream from files in/*.jpg to the directory out/, stabilizing to the first frame, with a lanczos-windowed sinc filter. USAGE
ale is a wrapper script that calls the executable ale-bin after extracting exposure EXIF information from image files (when the exiftool utility is available) and converting from raw formats (when the dcraw utility is available). When ale-bin has been linked with ImageMagick, input and output files may be of any kind supported by ImageMagick. Otherwise, only PPM files can be read and written by ale-bin. OPTIONS
OPTIONS are summarized via built-in help pages (see HELP OPTIONS below). More detailed manuals describing options and internal algorithms are available for certain versions of ALE. See SEE ALSO below for more details on other manuals. HELP OPTIONS
A listing of available help options can be obtained by invoking ale --hu. ENVIRONMENT
The wrapper script ale recognizes the following environment variables: ALE_BIN ALE executable to use. DCRAW dcraw raw extraction tool to use. EXIF_UTILITY EXIF extraction utility to use. ALE_COUNT_THREADS Displays statistics on thread counts when set to a non-zero value. PAGER Text pager to use (e.g., for displaying help pages). SEE ALSO
More detailed manuals for certain versions of ALE are distributed with source packages, and may also be available from: http://auricle.dyndns.org/ALE/manuals/ 03/31/2009 ALE(1)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy