Search Results

Search: Posts Made By: hhdzhu
43,046
Posted By mmarino
Thanks vino and grasper! It is in position 11,...
Thanks vino and grasper! It is in position 11, the first 5 characters are spaces so it looks like it's in position 5.
The sed solutions looks a lot more complicated to me. I figured I had to use $0...
2,937
Posted By rovf
As Don said, your example does not match the...
As Don said, your example does not match the specification you gave. Maybe you didn't mean "insert 3 random numbers", but "replace the spaces (at a certain position) by a 3-digit random number"?
...
2,937
Posted By Don Cragun
Changing the 4th and 5th characters on your input...
Changing the 4th and 5th characters on your input lines to 3-digit pseudo-random numbers in the output (as shown in your sample input and output) could be done with something like:
awk '
BEGIN...
1,704
Posted By Don Cragun
If you're saying that only want to add the given...
If you're saying that only want to add the given name to your file (without checking to see whether or not that name was already in the file, AND you don't need the line where it was added, the way...
1,400
Posted By MadeInGermany
The 1 (outside braces) is a true condition, and...
The 1 (outside braces) is a true condition, and its default action is {print} (and that is {print $0}).
1,400
Posted By RudiC
That depends highly on the contents between the...
That depends highly on the contents between the braces. As given, the two samples are identical. Should there be any statements inside the braces that either print something or modify any of the...
1,400
Posted By RavinderSingh13
Hello hhdzhu, If I understood correctly your...
Hello hhdzhu,

If I understood correctly your requirement then you wanted to know difference between awk '1;{print "\n"}' Input_file and awk '{print "\n"};1' Input_file.
Off course there is a...
1,400
Posted By pilnet101
So for number 1, by default the print command...
So for number 1, by default the print command within awk prints a new line at the end of the line it is printing. As the line here is blank (nothing enclosed within the quotes) it simply prints a...
1,045
Posted By RavinderSingh13
Hello hhdzhu, Welcome to forums, hope you...
Hello hhdzhu,

Welcome to forums, hope you will enjoy learning and sharing knowledge here. Following may help you in same.

awk -vTAB="\t" -vTTAB="\t\t" -vparan=")" -vCHAR1=" ,CHR(48),L,"...
1,045
Posted By rdrtx1
try: awk ' BEGIN {c["a"]="CHR(32),R,";...
try:
awk '
BEGIN {c["a"]="CHR(32),R,"; c["n"]="CHR(48),L,";}
NF==1 {
print "<?xml version=\"1.0\" encoding=\"GB2312\"?>";
print "<convGrp>";
print " <grpid>" $1 "</grpid>";
print...
Showing results 1 to 10 of 10

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