Search Results

Search: Posts Made By: ryran
5,990
Posted By CarloM
awk -F"TM" '{lines[$1]=$2} END {for (i in lines)...
awk -F"TM" '{lines[$1]=$2} END {for (i in lines) {print i lines[i]}}' inputfile
or
awk -F"TM" '!(lines[$1]) {lines[$1]=$2} END {for (i in lines) {print i lines[i]}}' inputfile


You could sort...
29,087
Posted By cfajohnson
awk '$7 == "." { next } { print }' "$file" ...
awk '$7 == "." { next } { print }' "$file"




awk '$7 == "." { $7 = "-1" } { print }' "$file"
27,591
Posted By radoulov
This type of variable assignment affects only the...
This type of variable assignment affects only the command it precedes (if you insert a semicolon between the assignment and the command the meaning changes):

with semicolon (IFS is affected inside...
27,591
Posted By radoulov
The IFS is reset for safety. Granted those are...
The IFS is reset for safety. Granted those are corner cases,
but consider the following:

% touch 'filename_with_trailing_ifs_char ' # ends with a space
% find -name '* ' |
while read; do...
27,591
Posted By radoulov
Backup your files first: find . -type f...
Backup your files first:

find . -type f -name '*[:?"]*' |
while IFS= read -r; do
mv -- "$REPLY" "${REPLY//[:?\"]}"
doneThe script will simply remove those characters. If you want to...
Showing results 1 to 5 of 5

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