Search Results

Search: Posts Made By: nwalsh88
8,480
Posted By balajesuri
I hope you have code to store the contents of...
I hope you have code to store the contents of file "amended_file_01" into variable "amended_file01"; after which a minor adjustment to your sed one-liner should do the trick:

sed...
3,409
Posted By elixir_sinari
May be you missed a new-line...but then that also...
May be you missed a new-line...but then that also depends on the OP's requirements...
3,409
Posted By balajesuri
awk '{ sum += $1 } END { printf "%012d", sum }'...
awk '{ sum += $1 } END { printf "%012d", sum }' totals.txt
2,745
Posted By drl
Hi. An alternative awk solution: ...
Hi.

An alternative awk solution:
#!/usr/bin/env bash

# @(#) s1 Demonstrate filter for first and last matches.

# Utility functions: print-as-echo, print-line-with-visual-space, debug.
#...
2,745
Posted By pamu
Please check below 1) I am assuming we need...
Please check below

1) I am assuming we need to print only first occurrence of a 00 entry and remove remaining all.
2) Remove all instances of an entry starting with 80 except last one
3) Keep...
2,745
Posted By pamu
Is this what you want...? awk 'NR==1 s=0 ...
Is this what you want...?

awk 'NR==1
s=0
NR>1 && !/^00/
/^00/{s=1}
END{if(s){print}}' file
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 05:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy