How to remove blank lines in a file and save the file with same name?
I have a text file which has blank lines. I want them to be removed before upload it to DB using SQL *Loader. Below is the command line, i use to remove blank lines.
If i use the below command to replace the file after removing the blank lines, it replace the existing file with a blank file.
Hi all,
I use translate web to get subtitle file in my langues . But in output file have bad blank lines .
I need scrip (i use debian ) to remove this blank lines .
szintax of my bad *.srt file :
------
number
blank1
number:number ---> number:number
blank2
text1
.
textn
blankS... (10 Replies)
Hi Guys,
I have been trying to remove blank lines from a file with no success. I tried using all the following options on the file:
tr -s '\n' < abc.txt
grep -v "^$" abc.txt
sed '/^$/d' abc.txt
sed '/./!d' abc.txt
awk '/./' abc.txt
The file is a text file. (11 Replies)
I have an Expect script which works very well. It logs into my remote routers and runs some commands and then to the next until finished. I need two things, first I need to save the output to a file from where the log_user 1 begins.
expect << EOF
set timeout 15
#set var "exit "
match_max... (1 Reply)
Hi,
I am using BASH. How can I remove any lines in a text file that are either blank or begin with a # (ie. comments)? Thanks in advance.
Mike (3 Replies)
Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,... (11 Replies)
Dears,
i want cut the lines from a log file. Example of the log file as follows..
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMDeliverContrUtil isDeliverSM
FINE:
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMUtil addSysUpMsgLog
INFO: . The message content... (1 Reply)
Hi friends,
I have a doubt, I am not sure whether it is possible ah nu.
I am having a file(sample.txt) which contain 5 lines.
I want to remove 1st line in the file and save the file with same old name (sample.txt).
For removing 1st line i am using
sed 1d filename
But dono how to... (3 Replies)
Hi, all
I have a csv file that I would like to remove duplicate lines based on 1st field and sort them by the 1st field. If there are more than 1 line which is same on the 1st field, I want to keep the first line of them and remove the rest. I think I have to use uniq or something, but I still... (8 Replies)
Hi All
Need Help
I have a file with the below format (ABC.TXT) :
®¿¿ABCDHEJJSJJ|XCBJSKK01|M|7348974982790
HDFLJDKJSKJ|KJALKSD02|M|7378439274898
KJHSAJKHHJJ|LJDSAJKK03|F|9898982039999
(cont......)
I need to write a script where it will check for : blank lines (between rows,before... (6 Replies)
Discussion started by: chatwithsaurav
6 Replies
LEARN ABOUT OSX
isphonogram_l
ISALNUM_L(3) BSD Library Functions Manual ISALNUM_L(3)NAME
isalnum_l, isalpha_l, isblank_l, iscntrl_l, isdigit_l, isgraph_l, ishexnumber_l, isideogram_l, islower_l, isnumber_l, isphonogram_l,
isprint_l, ispunct_l, isrune_l, isspace_l, isspecial_l, isupper_l, isxdigit_l -- character classification utilities
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <wctype.h>
#include <xlocale.h>
int
isalnum_l(int c, locale_t loc);
int
isalpha_l(int c, locale_t loc);
int
isblank_l(int c, locale_t loc);
int
iscntrl_l(int c, locale_t loc);
int
isdigit_l(int c, locale_t loc);
int
isgraph_l(int c, locale_t loc);
int
ishexnumber_l(int c, locale_t loc);
int
isideogram_l(int c, locale_t loc);
int
islower_l(int c, locale_t loc);
int
isnumber_l(int c, locale_t loc);
int
isphonogram_l(int c, locale_t loc);
int
isprint_l(int c, locale_t loc);
int
ispunct_l(int c, locale_t loc);
int
isrune_l(int c, locale_t loc);
int
isspace_l(int c, locale_t loc);
int
isspecial_l(int c, locale_t loc);
int
isupper_l(int c, locale_t loc);
int
isxdigit_l(int c, locale_t loc);
DESCRIPTION
These functions are extended locale versions of the corresponding functions, with the _l removed. Also, see xlocale(3) for more information
about extended locales.
SEE ALSO isalnum(3), isalpha(3), isblank(3), iscntrl(3), isdigit(3), isgraph(3), ishexnumber(3), isideogram(3), islower(3), isnumber(3),
isphonogram(3), isprint(3), ispunct(3), isrune(3), isspace(3), isspecial(3), isupper(3), isxdigit(3), xlocale(3)BSD March 11, 2005 BSD