Active 9 years, 3 months ago. Viewed 12k times. Marc S. Where are you stuck? Can you show us some code? Bash does not have SSL support, you have to use some external program, or hack in SSL to Bash itself hardly more than a theoretical option.
Add a comment. Active Oldest Votes. Zsolt Botykai Zsolt Botykai John V John V 21 1 1 bronze badge. The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE.
Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile.
Reducing the weight of our footer. Each of them has about 15 lines, one for each table that the data is going. One a recent import batch, some of the import files failed going into one particular table.
So, I have a bunch of shell scripts about where I need to comment out the first 7 lines, then rerun the file. There are about shell scripts in this folder, and nothing about a particular file can tell me if it needs the edit. I've got a list of which files that I pulled from the database output. So how do I write a bash script or anything else that would work better to take this list of file names and for each of them, comment out the first 7 lines, and run the script?
Not sure how readable that is. Basically, the first 7 lines not counting the first line need to have a added to the beginning of them. Note: the files have been edited to make each line shorter and partially cut off copying out of VIM. But in the main part of each file, there is a line starting with echo, then a line starting with sqlldr. That'll comment out the first 12 lines in "test. Ultimately you're going to want to use the linux command sed. Whatever logic you need to place in the script, you know.
But your script will ultimately call sed. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more.
Bash script to edit a bunch of files Ask Question. Asked 12 years ago. Active 11 years, 9 months ago. Viewed 3k times. David Oneill. David Oneill David Oneill Edited to include sample file.
Add a comment. Active Oldest Votes. Using sed, you can specify a line number range in the file to be changed. EDIT: changed the lines numbers to reflect comments. Buggabill Buggabill IE how do I tell the while read line to pull from the file list? Is it as simple as putting the list of files in a file and redirecting input from that file?
This will read a file "filelist.
0コメント