Timeline for Use Command Line Argument and Variable with sed Inside Bash Script
Current License: CC BY-SA 3.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 16, 2015 at 4:43 | vote | accept | Audrey | ||
| Nov 10, 2015 at 21:13 | vote | accept | Audrey | ||
| Nov 16, 2015 at 4:43 | |||||
| Nov 10, 2015 at 21:12 | vote | accept | Audrey | ||
| Nov 10, 2015 at 21:13 | |||||
| Nov 10, 2015 at 20:41 | vote | accept | Audrey | ||
| Nov 10, 2015 at 21:12 | |||||
| Nov 10, 2015 at 20:41 | answer | added | Audrey | timeline score: 0 | |
| Nov 9, 2015 at 8:47 | answer | added | mikeserv | timeline score: 1 | |
| Nov 9, 2015 at 2:01 | vote | accept | Audrey | ||
| Nov 10, 2015 at 14:58 | |||||
| Nov 8, 2015 at 21:04 | comment | added | RobertL |
Thanks for the update. Not sure what you mean by "so that the following, for example, are referring to the edited version of my file". I think you're saying that at some point you will transform the data in $1, adding/removing columns and so forth, and then send the header for the new format and the matching transformed file to vsql? So in the end, to match the new contents of the file, the header will contain a different number and/or different strings than you started with in the first columns=?
|
|
| Nov 8, 2015 at 18:32 | history | edited | Audrey | CC BY-SA 3.0 |
edited body
|
| Nov 8, 2015 at 18:15 | history | edited | Audrey | CC BY-SA 3.0 |
Tried for more clarity based on comments. Included examples from header row, explained newlines, gave other example of what I plan to do with the edited file.
|
| Nov 6, 2015 at 22:36 | comment | added | terdon♦ |
You are taking a needlessly complex approach here. Unfortunately, I can't help you simplify it unless you edit your question and show us i) your input and ii) your desired output. For a start, consider using columns=head -n1 $1 | sed 's/[- ]/_/g' | ....
|
|
| Nov 6, 2015 at 22:11 | comment | added | RobertL | We can get a better answer quicker with some of the input and output data, especially the input header line. Good question, thanks! | |
| Nov 6, 2015 at 22:06 | history | edited | cas | CC BY-SA 3.0 |
reformatted to get rid of horiz. scroll bar. added <!-- language: lang-sh --> to fix syntax highlighting.
|
| S Nov 6, 2015 at 21:56 | history | suggested | RobertL | CC BY-SA 3.0 |
change "keyword arguments" to "command line argument" add sed tag
|
| Nov 6, 2015 at 21:39 | review | Suggested edits | |||
| S Nov 6, 2015 at 21:56 | |||||
| Nov 6, 2015 at 21:34 | answer | added | RobertL | timeline score: 2 | |
| Nov 6, 2015 at 20:46 | history | asked | Audrey | CC BY-SA 3.0 |