Search Results

Search: Posts Made By: rak Kundra
4,649
Posted By Scrutinizer
Do you mean a literal newline character, or the...
Do you mean a literal newline character, or the two characters \n?


If the former, try:
awk NF oldfile > new file

--
How big are the files?
4,649
Posted By RudiC
Provided your system (which you fail to mention,...
Provided your system (which you fail to mention, btw) has the stat command available, try[ $(stat -c%s "$file") = 1 ] && >"$file"
4,649
Posted By nezabudka
#!/bin/bash file="file.log" if ! grep -q...
#!/bin/bash
file="file.log"
if ! grep -q "[[:print:]]" $file; then
>$file
fi
Showing results 1 to 3 of 3

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