Search Results

Search: Posts Made By: Scrutinizer
7,032
Posted By Scrutinizer
This would break if there are file names with...
This would break if there are file names with spaces and/or special characters. To avoid that you would need to use properly quoting:
print "$FILE"
tail -1 "$FILE"

Also, wc -c only counts bytes,...
7,032
Posted By Scrutinizer
Try: find sent/ -type f -exec tail -1 {} \; |...
Try:
find sent/ -type f -exec tail -1 {} \; | awk '{print length}'
To also count the linefeed at the end of the line, like wc -c or wc -m use awk '{print length+1}'



--
Use wc -c counts...
Showing results 1 to 2 of 2

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