Search Results

Search: Posts Made By: MasWag
2,137
Posted By MasWag
If you use GNU AWK, the following command will...
If you use GNU AWK, the following command will work well.

gawk 'ENDFILE{print NR"|"FILENAME}' file.txt asdf.txt lkjh.txt bvcx.txt
1,153
Posted By MasWag
I am not sure the format of your files but the...
I am not sure the format of your files but the script will be like this. If the input_file is large, using AWK instead of while-loop may make sense.


cat input_file | while read IP; do
grep -F...
1,712
Posted By MasWag
With sed, like this cat input.xml | tr -d...
With sed, like this

cat input.xml | tr -d "\n" | sed 's:</d><pokl>\|$:\n:g;' | sed 's/^.*GBNo=//;s:</pokl><d>: :;s:</d><d>:;:g;s:</d>::;'
4,936
Posted By MasWag
Hello Zam_1234, How about this? awk...
Hello Zam_1234,
How about this?
awk 'BEGIN{FS=",";RS="\n";OFS=",";ORS="\n";} {for (i=1;i<=8;++i){$(16+i)=$(i+8)*100;}}1' file.csv > newfile.csv
2,446
Posted By MasWag
If the data follows these rules (reverse...
If the data follows these rules (reverse lexicographical order), you can write like this.

$12 && (p = $0) && NF-- && (l = $0) && $0 = p;!$12 && l != $0;

rules

empty duplicate line appears...
Showing results 1 to 5 of 5

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