Sponsored Content
Top Forums Shell Programming and Scripting Sending output of program into subsequent commands (i.e. awk/sort) Post 303036412 by RudiC on Tuesday 25th of June 2019 06:08:46 AM
Old 06-25-2019
Not with a single input source piped into something. Note that you open and read test.txt twice in your above construct. You could do (but this is far from being smart nor efficient)


Code:
cat <(docker image ls | head -n1) <(docker image ls | tail -n+2 | sort -Vrk5 )

You might feel inspired to use tee to split the input into different branches of execution, but it'd be difficult to predict the resultant order of lines. This clumsy approach seems to do it on my system
Code:
docker image ls | tee >(head -n1) >(tail -n+2 | sort -rk5) > /dev/null

, but, again, this is far from using common sense.
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

combining unix commands and awk program

Dear Experts I am trying to find if it is possible to combine unix commands in awk program. For example if it is possible embed rm or ls or any unix command inside the awk program and while it is reading the file besides printing be able to do some unix commands. I am thinking may be just print... (2 Replies)
Discussion started by: Reza Nazarian
2 Replies

2. UNIX for Dummies Questions & Answers

Using the Sort, Cut, and Awk commands

Hello, I am trying, utilizing the few commands I know, to extract all records within my file that were generated in November of 2007. Each record within the file has a "date" field giving the month, day, and year (9-8-88). How do I extract those records to their own file? Once I extract... (4 Replies)
Discussion started by: babbabooey
4 Replies

3. UNIX for Dummies Questions & Answers

Sending awk output to nothing?

How can I direct awk output to go nowhere? I can write the data to a file easy enough or print it on the screen. But for this particular command I don't actually want the data and I don't want to create a file. I just want the data discarded. Thanks in advance (3 Replies)
Discussion started by: MrEddy
3 Replies

4. Shell Programming and Scripting

awk text record - prepend first field to all subsequent fields

Hello everyone, I've suddenly gotten very interested in sed and awk (and enjoying it quite a bit too) because of a large conversion project that we're working on. I'm currently stuck with a very inefficient process for processing text blocks. I'm sure someone here should be able to easily point out... (2 Replies)
Discussion started by: jameswatson3
2 Replies

5. Shell Programming and Scripting

awk - use fields from subsequent lines

I've run into a problem getting exactly what I want out of awk - some folks may recognize this as an output from Amazon's ec2-describe-instances: Given the following: INSTANCE i-4960f321 BLOCKDEVICE Line2Var2 TAG instance i-4960f321 Name web1 TAG instance i-4960f321... (2 Replies)
Discussion started by: colinjohnson
2 Replies

6. UNIX for Dummies Questions & Answers

is there a way to assing variable a value that is output of a program in awk script?

Hi there is there a way to assing variable a value that is output of a program in awk script. For e.g., I did temp=(`grep "" $5 | cut -f8 -d' '`) but it does not work. Any advice??? Thanks in advance!!! :) (3 Replies)
Discussion started by: FUTURE_EINSTEIN
3 Replies

7. Shell Programming and Scripting

Want to sort a file using awk & sed to get required output

Hi All, Need Suggestion, Want to sort a file using awk & sed to get required, output as below, such that each LUN shows correct WWPN and FA port Numbers correctly: Required output: 01FB 10000000c97843a2 8C 0 01FB 10000000c96fb279 9C 0 22AF 10000000c97843a2 8C 0 22AF 10000000c975adbd ... (10 Replies)
Discussion started by: aix_admin_007
10 Replies

8. Shell Programming and Scripting

Pipe or combine output of three awk commands

What is the correct syntax to pipe or run three awk commands? Basically, using the output of the first awk as input in the second. Then using the output of the second awk in the third. Thank you :). awk 'FNR==NR {E; next }$3 in E {print $3, $5}' panel_genes.txt RefSeqGene.txt > update.txt |... (3 Replies)
Discussion started by: cmccabe
3 Replies

9. Shell Programming and Scripting

awk capturing first sample, but not subsequent id's

In the awk below the first sample MEV45 gets extracted from the html, but the subsequent MEV46 and MEV47 do not as they are not part of parse. I can not seem to add them to the code. Thank you very much @RudiC your awk is very nice :). input {"barcodeId": "IonXpress", "barcodedSamples":... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. Shell Programming and Scripting

awk Sort 2d histogram output from min(X,Y) to max(X,Y)

I've got Gnuplot-format 2D histogram data output which looks as follows. 6.5 -1.25 10.2804 6.5404 -1.25 10.4907 6.58081 -1.25 10.8087 6.62121 -1.25 10.4686 6.66162 -1.25 10.506 6.70202 -1.25 10.3084 6.74242 -1.25 9.68256 6.78283 -1.25 9.41229 6.82323 -1.25 9.43078 6.86364 -1.25 9.62408... (1 Reply)
Discussion started by: chrisjorg
1 Replies
apertium-desrtf(1)														apertium-desrtf(1)

NAME
apertium-desrtf - This application is part of ( apertium ) This tool is part of the apertium open-source machine translation toolbox: http://apertium.org. SYNOPSIS
apertium-desrtf [ <input file> [ <output file> ] ] DESCRIPTION
apertium-desrtf is an RTF format processor. Data should be passed through this processor before being piped to lt-proc. The program takes input in the form of an RTF document and produces output suitable for processing with lt-proc. RTF commands and other format information are enclosed in brackets so that lt-proc treats them as whitespace between words. OPTIONS
-h, --help Display this help. EXAMPLE
You could write the following to show how the input document is analysed: cat <input.rtf> | apertium-desrtf | lt-proc ca-es.automorf.bin SEE ALSO
apertium-destxt(1), apertium-deshtml(1), lt-proc(1), apertium-translator(1), apertium(1). BUGS
Lots of...lurking in the dark and waiting for you! AUTHOR
Copyright (c) 2005, 2006 Universitat d'Alacant / Universidad de Alicante. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. 2006-03-21 apertium-desrtf(1)
All times are GMT -4. The time now is 07:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy