Search Results

Search: Posts Made By: SSteve
7,922
Posted By SSteve
Ok. I missed the fact that the original line...
Ok. I missed the fact that the original line prints followed a blank line. Sorry about that. It looks like value for "lastrow" is not carried over into the END block. Which is weird because the first...
7,922
Posted By SSteve
Ok, I got a similar (but not exactly identical)...
Ok, I got a similar (but not exactly identical) result by leaving out "{ print $0; lastrow = $0 }". Are you sure there isn't a typo somewhere? Try copying the code directly from your message, because...
7,922
Posted By SSteve
It worked for me: $ more foofile abc xyz lmn...
It worked for me:
$ more foofile
abc xyz lmn 89 lm nk o p 2 p
$ more process.awk
BEGIN { c = 0 }

{ print $0; lastrow = $0 }

END { while ( c < 10 ) {
$0 = lastrow
++$4
$9 = $9 + 24 ...
12,762
Posted By SSteve
Oh, of course. I missed the space after the file...
Oh, of course. I missed the space after the file name. Good thing I don't make my living as a parser. :D
3,805
Posted By SSteve
The thing that makes it complicated is that...
The thing that makes it complicated is that /*...*/ can span more than one line. sed generally works on a single-line basis, so you have to do more advanced stuff like in the script I found.
...
26,842
Posted By SSteve
Try the "getprivgrp" command and see if you have...
Try the "getprivgrp" command and see if you have the CHOWN privilege (or if it is allowed globally).
1,791
Posted By SSteve
You can do "cd ~/Sites" before starting ftp. When...
You can do "cd ~/Sites" before starting ftp. When you get a file, it is stored into the local working directory.

Or, once you're in ftp, you can do "lcd ~/Sites" to set the local working directory.
3,805
Posted By SSteve
I found this at...
I found this at http://www.zazzybob.com/bin/remcoms.sed.html:

#!/usr/bin/sed -f
#< Remove C/C++ comments from files
# Another way to do it - adapted from a script found here
#...
63,652
Posted By SSteve
My Unix knowledge is not very deep yet. I was...
My Unix knowledge is not very deep yet. I was completely unaware of command substitution. What a great feature! Thanks very much.
12,762
Posted By SSteve
It sends an email with the subject " Master Data...
It sends an email with the subject " Master Data Transmission Report for $TODAY at $TIME " with the contents of the file /etc/tr/tmp/$tmplog omni_list. ($TODAY and $TIME will be replaced with the...
63,652
Posted By SSteve
Ok, "`/bin/echo '\t'`" did it! Thanks very much...
Ok, "`/bin/echo '\t'`" did it! Thanks very much for your help and perseverance.

I'm not familiar with the "backwards" single quote. What does that do? (And what do you call it?)
26,842
Posted By SSteve
from man chown (on an HP system): In order...
from man chown (on an HP system):

In order to change the owner or group, you must own the file and have the CHOWN privilege (see setprivgrp(1M)).

It looks like you don't have the CHOWN...
63,652
Posted By SSteve
Thanks but still no luck. On OS X that still...
Thanks but still no luck. On OS X that still sorts by the entire line. On the HP system, it's rejected as invalid syntax. (I removed the character after the opening double quote since that must be a...
63,652
Posted By SSteve
Thanks for the quick reply, but that doesn't seem...
Thanks for the quick reply, but that doesn't seem to work. Here's a sample input file where I've converted the tabs to vertical bars:

a album|c song|2
b album|d song|2
a album|a song|4
a...
63,652
Posted By SSteve
How do I specify tab as field separator for sort?
I'm trying to use sort on a file with tab-delimited fields. I can't figure out how to tell sort to use the tab character as the field separator. I'm trying this on both an HP Unix system and on OS X...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy