Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Empty-string/AWK/empty-string.awk
Normal file
16
Task/Empty-string/AWK/empty-string.awk
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
# Demonstrate how to assign an empty string to a variable.
|
||||
a="";
|
||||
b="XYZ";
|
||||
print "a = ",a;
|
||||
print "b = ",b;
|
||||
print "length(a)=",length(a);
|
||||
print "length(b)=",length(b);
|
||||
# Demonstrate how to check that a string is empty.
|
||||
print "Is a empty ?",length(a)==0;
|
||||
print "Is a not empty ?",length(a)!=0;
|
||||
# Demonstrate how to check that a string is not empty.
|
||||
print "Is b empty ?",length(b)==0;
|
||||
print "Is b not empty ?",length(b)!=0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue