I find myself editing multiple files, sometimes with the same bits of information. My bash script, a changelog, and a plist file (OS X). Once I realized this, I thought why not script part of this process (and so it begins). In any case, I've solved several of the tasks I've set forth for myself. My new update script will update version/revision numbers in all files, and add text to the top of my change log using a combination of bash, python, and now perl (I think I'm nerding out a bit). I know this is all overkill, I just wanted to see if I could do it.
So, with the command
What I'm stuck with is the next bit.
Well, maybe not stuck. It works fine. But, if I could somehow make this perl one-liner also wrap text at 80 columns and add a "#\t\t" at the start of each line (and make me a sandwich).... Is that just asking too much? Maybe I should cut down on the energy drinks.
---------- Post updated at 23:21 ---------- Previous update was at 23:20 ----------
hi,
I am using PERL one liner for oracle database connection as :
$PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:SID user passwd));"
is there a way to append select statement to this connection ? i.e. DB connection and select stmt in one line ?
how to do sysdba connection using one lines... (1 Reply)
Ksh is my default shell, but I want use the bash shell since its convenient to me.
When I type a long command line in a terminal, it does not wrap to the next line when I reach the end of the line and it wraps onto the same line, overwriting my prompt and the rest of what I typed.
$... (5 Replies)
Platform : RHEL 5.4
I have several .sql files in a directory. I want to comment lines 10 to 25 for all .sql files.
How can I do this ?
The symbol for comment in SQL is --
eg:
-- select salary from emp where empname = 'URS' ; (3 Replies)
Hi All,
I need to comment specific Two Lines in fstab & want to do using & also want to ensure that is done corretly.
I am trying the below method. But its giving Search pattern not terminated.
################
b36376 67 % cat linux-fstab_testing | perl -i -wnl -e '/^('\Q... (1 Reply)
I want to find out which files under /etc have the the following section:
and then i would like to comment out the above section in all the files.
Please help. (3 Replies)
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Greetings!
Some of my files list hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like "No error", else I display the error from the file itself.
I came up with this (with help)
for myfile in `find . -name... (2 Replies)
Hi ,
Can anybody explain how this perl one liner works..
It is to test whether the number is prime or not
perl -le 'print "PRIME" if (1 x shift) !~ /^(11+)\1+$/' 19
Thanks in advance
Shihab (2 Replies)