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

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
15m
revised How to use cp command in bash script to copy files with spaces ans $ characters in it?
added 1894 characters in body
18m
comment How to use cp command in bash script to copy files with spaces ans $ characters in it?
It says cp: cannot stat /pmautomation/PM/Report_Output/CFBLOCKTRUMNG/2015-08-01/Bharti\\ Blocked\\ TRX\\ Report\\ \\ Morning$TN@*': No such file or directory when i use this in the source path: cp "$TRX_SOURCE_PATH/Bharti\ Blocked\ TRX\ Report\ \ Morning\$TN@*" $DEST_PATH
24m
comment How to use cp command in bash script to copy files with spaces ans $ characters in it?
The answer mentions to use quotes for the variable which i am already using and it won't work.
25m
revised How to use cp command in bash script to copy files with spaces ans $ characters in it?
added 180 characters in body
56m
asked How to use cp command in bash script to copy files with spaces ans $ characters in it?
2d
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.