Using perl's matching operator, I can extract lines 3, 6, and 9 from a file:
perl -wnl -e 'print if $. !~ m/^(3|6|9)$/' datafile.txt
Is there syntax for the matching operator that allows deleting a range of lines, say from 3 to 9?
Thanks!
Ed
I'm new to Teradata, and I'm having a very strange problem with the Teradata SQL Analyzer. When my SQL DML executes, in the Answerset window instead of displaying the column names it displays alphabet letters.
For example, if I execute:
select col1, col2, col3, col4 from table_name
then in...
Hi:
I seem to remember being able from within vi being able to execute an external command, and have the results of that command appear in vi.
Does anybody no how to do this.
Regards,
Ed
Hi:
I'm trying to get the number of seconds from the epoch into a Ksh script using Perl's timelocal function. (I'm a Perl newbie using Perl version 5.005_3 under Solaris 7).
The string is space delimited: year month day hour minute second.
I'm getting the error:
Month '-1' out of range 0..11...
Hi:
In a number of posts, we've discussed in shell how to manipulate the terminal driver to return one character without pressing return.
This particular function was posted by Nate, the Bigoldbulldog:
#!/bin/sh
getkey() {
TTYSTATE=`stty -g`
stty raw
key=`dd if=/dev/tty bs=1 count=1...
Everybody:
Since Informix 4GL is going the way of Cobol, I decided to post a function FAQ. No sense reinventing the wheel. Here's a synopsis:
{
Miscellaneous Informix 4GL functions
abs(val) # returns the absolute value of a integer
abs_dec10() # returns the absolute value of a...
Hi:
I had need in an awk script (solaris 7) to determine if a field was a social security number, SSN. In Dale Douugherty's book Sed & Awk, he describes a sed regular expression for SSN. The following sed stub substitutes correctly if the data echoed to sed is 3 numerics followed by dash, 2...
This is a warning for users of Informix 4GL 7.2 UD1 on platform SCO Open Server 5: 02/29/2000 is not recognized as a valid date doing data entry. This is not an on-line engine problem, but a 4GL 7.2 UD1 problem. I did some date arithmetic with dbaccess and 02/29/00 is recognized as leap...
This isn't really a question but a warning. If your Informix shop is using Informix 4GL, as an Informix DBA you may be responsible for linking the callable-by-4GL "C" functions into the Informix RDS runtime. I noticed the following problem:<br>
<br>
Unix Platform: SCO Open Server 5<br>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.