Search Results

Search: Posts Made By: nakaedu
2,211
Posted By nakaedu
awk -F'[^ ]' ' { current_len = length($1) ...
awk -F'[^ ]' '
{ current_len = length($1)
last_len = length(last_line)
len = current_len > last_len ? last_len : current_len
last_line = substr(last_line, 1, len) substr($0, len + 1)
print...
2,211
Posted By nakaedu
I only need the text/string until there is a...
I only need the text/string until there is a character that is not a whitespace on that line. If there is already data in there I do not want to modify that.

I am afraid there is no tab, only...
2,211
Posted By nakaedu
awk sed to repeat every character on same position from the upper line replacing whitespace
Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position?

I am asking this because the file I have doesn't always follow a pattern. ...
1,090
Posted By nakaedu
Thank you rdrtx1 your script resolved everything,
Thank you rdrtx1 your script resolved everything,
1,090
Posted By nakaedu
awk sed -
Hi

I am trying to replace a field from one file with a field of another file:
Let's say I have:
File1...
2,858
Posted By nakaedu
Worked perfectly, thanks
Worked perfectly, thanks
2,858
Posted By nakaedu
I have to apologize, my original post is not...
I have to apologize, my original post is not clear enough.
I have removed my original requirement to sum fields $13 and $14 because it is adding complexity and I don't really require them for the...
2,858
Posted By nakaedu
awk summing specific lines and fields
Hi
I would like to know if it is possible to sum some specific fields.

I have this

x;x;x;x;x;x;x;x;467,390,611 Bytes;0.435291 GB;0.062247 GB;0.373045 GB;11,225;157...
3,774
Posted By nakaedu
Thank you again $9=($9/(1024^3)) this will...
Thank you again
$9=($9/(1024^3)) this will work too
14,400
Posted By nakaedu
awk gsub multiple fields
Hi,

I am trying to execute this line
awk -F ";" -v OFS=";" '{gsub(/\./,",",$6); print}' FILE

but for multiple fields $6 $7 $8

Do you have a suggstion?

Tried:
awk -F ";" -v...
3,774
Posted By nakaedu
Thank you this is worked perfectly but I have a...
Thank you this is worked perfectly but I have a question.
Is it possible to keep the $9 field with the size in bytes, and to add a new field in GB?

I tried this and it works, but is there a...
3,774
Posted By nakaedu
awk math and csv output
Hi I have this list

592;1;Z:\WB\DOCS;/FS3_100G/FILER112/BU/MPS/DOCS;;;;\\FILER112\BUMPS-DOCS\;580,116,544,878 Bytes;656,561 ;77,560 ...
10,065
Posted By nakaedu
This is what I got $ head -1 lista1.csv |...
This is what I got

$ head -1 lista1.csv | od -c
0000000 357 273 277 \ \ n a k a m a \ c o m p
0000020 a r t \ ; 9 4 . 2 6 0 . 9 7 4
0000040 B y t e s ; 7 ; 1 \r \n
0000055



----------...
10,065
Posted By nakaedu
Sed - remove special characters
Hi,

I have a file with this line, it's always in the first line:

I want to remove these special characters: ´╗┐

file1
´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35 Bytes;2...
1,763
Posted By nakaedu
Thank you both guys, you resolved my issue.
Thank you both guys, you resolved my issue.
1,763
Posted By nakaedu
[Solved] get specific information from text file or command output
Hello,

I would need some help, :wall: on a linux script,

I am not sure how can I separate some text file,

Text file contains something similar to this:
share "userhome_e"...
4,417
Posted By nakaedu
I understand now, I was using everything on a...
I understand now, I was using everything on a script but not using the ; separator:

This is the script:


del 1not2.txt
del 2not1.txt
gawk "{ _0 = tolower($0); if (NR == FNR) A[_0]; ...
4,417
Posted By nakaedu
Thank you, I'm afraid it's not working or I'm...
Thank you, I'm afraid it's not working or I'm doing something wrong, I get this when trying to run:

gawk " { _0 = tolower($0) if (NR == FNR) A[_0] else B[_0] }END{for(x in A){if(!(x in...
4,417
Posted By nakaedu
I tried many ways, gawk -v IGNORECASE=1...
I tried many ways,
gawk -v IGNORECASE=1 "{if(NR==FNR){A[$0]}else{B[$0]}}END{for(x in A){if(!(x in B))print x>\"1not2.txt\"}for(x in B){if(!(x in A))print x>\"2not1.txt\"}}" x1 x2

just creates...
4,417
Posted By nakaedu
GAWK case insensitive comparison
Hi :o
I'm working on Windows, with gawk,
and let's say I have two files to compare.
searching for a script to do a text comparison I came across to this line:

gawk...
Showing results 1 to 20 of 20

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