« first day (4241 days earlier)      last day (717 days later) » 

8:34 PM
Is it possible to update the same file using redirecting or pipe operators?
cat file1 > awk '{print $1}' > file1
 
9:17 PM
@EnthusiastiC In general, no. You may use sponge for that (assuming the file you are working on is not huge). See, for instance, unix.stackexchange.com/questions/558773/…
 
@EnthusiastiC No. That command would truncate (empty) the two files called awk and file1 and would then try to cat the file called {print $1} into file1.
The portable solution is to write to a temporary file, and then replace the original with that new file.
With GNU awk, you can do in-place editing. See unix.stackexchange.com/questions/496179/…
 

« first day (4241 days earlier)      last day (717 days later) »