Hello
I'm manipulating a file, taking certain variables & printing them to an output file using awk (actually nawk because I'm using -v).
I now want to take a field from the input file & expand it to a pre-defined length by preceding the string with spaces.
Hii i am new to junit test for android so my question is i have 6 EditText fields and one Button by pressing the Button it will check weather the field length of EditText fields are zero,if they are zero then it will show a Toast and otherwise it will go to another Activity so here is the my code
Button.OnClickListener okListener = new Button.OnClickListener() {
public void onClick(View a
Hi,
I've tried searching through the forum but I've drawn a blank so i'm going to post here. I'm developing a number of checks on a CSV file, trying to find if any are greater than a max limit. I'm testing it by running it from a command line.
The file I'm testing has 8 records.
Another sniff:16:17:25.686360 ARP, Request who-has 192.168.1.1 tell 192.168.1.105, length 28
16:17:26.689702 ARP, Request who-has 192.168.1.1 tell 192.168.1.105, length 28
16:17:27.693010 ARP, Request who-has 192.168.1.1 tell 192.168.1.105, length 28
16:17:28.713027 ARP, Request who-has 192.168.1.1 tell 192.168.1.105, length 28
16:17:29.716363 ARP, Request who-has 192.168.1.1 tell 192.168.1.105, l
I have a log-file where at the end of a series of lines you can see if this block is relevant
now I'm looking for a command like sed to delete de blocks ending with "Content-Length: 0" and beginning with the last "--" before this line.
I tried sed -n "/--/,/Content-Length: 0/d" but this takes the first "--" and the first "Content-Length: 0" and deletes it.
ex :
line 1 "--"
line 2
line 3 "
I have a log-file where at the end of a series of lines you can see if this block is relevant
now I'm looking for a command like sed to delete de blocks ending with "Content-Length: 0" and beginning with the last "--" before this line.
I tried sed -n "/--/,/Content-Length: 0/d" but this takes the first "--" and the first "Content-Length: 0" and deletes it.
ex :
line 1 "--"
line 2
line 3 "
Running below line gives 3957 as length of longest line in file 20121119_SRMNotes_init.dat
Code:
awk ' { if ( length > 3950 ) { x = length } }END{ print x }' 20121119_SRMNotes_init.dat
While wc -L 20121119_SRMNotes_init.dat gives output as 4329. Why is there a difference between these two commands.
Thanks
I want to make a script to read row by row and find its length. If the length is less than my required length then i hav to append spaces to that paritucular row.
Hello,
I am writing an open-source stemmer in Java for Indic languages which admit a large number of suffixes.
The Java stemmer requires that each suffix string be sorted as per its length and that all strings of the same length are arranged in a single group, sorted alphabetically.