Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
1 3 13
Impact
~45k people reached

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
18h
asked How to use SFTP in a script to non-interactively pull file from remote host?
Jul
28
asked How to pass variables to awk command with conditions?
Jul
25
revised How to extract column name (header) from a CSV file which contains the max value in a row?
Added sample data and desired output from the sample data for better understanding of the question and removed typos.
Jul
25
accepted How to rename all files with special characters and spaces in a directory?
Jul
25
answered How to rename all files with special characters and spaces in a directory?
Jul
24
comment How to rename all files with special characters and spaces in a directory?
It doesn't give anything, no output, no error. It just lands on next command line.
Jul
23
comment How to extract column name (header) from a CSV file which contains the max value in a row?
Could you please suggest the way in bash script or the changes in my awk for the same?
Jul
23
comment How to extract column name (header) from a CSV file which contains the max value in a row?
Along with the column name, how can i print the column value also i.e, if the max value is in column 5, it should print 5.
Jul
23
asked How to extract column name (header) from a CSV file which contains the max value in a row?
Jul
17
comment How to rename all files with special characters and spaces in a directory?
I tried all the three without -n option and still it won't change the name of the file. I doesn't give any error for any of the 3 types mentioned above. Maybe the rename command doesn't work for some reason. Is there any other way to change all the files in a directory with spaces or $ or @ in their names?
Jul
17
asked How to rename all files with special characters and spaces in a directory?
Jul
16
comment How can i use multiple if statement inside another if statement of a awk program?
Thanks a lot Gary and Gilles for your inputs. I will try this. One more question here, in the last condition, (!match $1, "-") Is this going to ignore all the values in column 1 where value conatins a _ ex: BTS_101, BSC_505 etc? and the hopefully the last print statement prints the entire CSV file data after filtering all the above conditions in the input CSV file?
Jul
15
asked How can i use multiple if statement inside another if statement of a awk program?
Jul
14
asked How to select rows from a CSV file based on different column values?
Jul
14
comment How to parse a CSV file based with groups made of specific number of rows?
Also, is there a way to replace the datamash sum command with the general command where i can replace the sum operation with any other operation i want to perform? I have the requirement to perform various operations (like sum, average, calculate formulas) on the column values in each row in the CSV file which has multiple counter values in it. With the awk command you mentioned, i was able to repeat the date values in the empty columns which will really be useful to me.
Jul
14
comment How to parse a CSV file based with groups made of specific number of rows?
Thanks Icd047, i partially achieved what i wanted to get here. Could you please explain a little bit about this awk command awk -F, -v OFS=, '{ if($1 ~ /^[ \t]*$/) $1 = old; else old = $1 } 1' Actually i am a novice to scripting and awk and if you could break this command and explain what it is doing, it would be really helpful for me in the future.
Jul
13
asked How to parse a CSV file based with groups made of specific number of rows?
Jun
23
awarded  Popular Question
Apr
18
awarded  Nice Question
Jan
14
awarded  Notable Question