|
First
|
Prev |
Next
|
Last
Pages: 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
co-process in ksh I can create a co-process and read from the process with commands like: ============================ $ cat /etc/passwd |& $ read -p1 line $ echo $line root:x:0:0:Super User:/:/bin/sh $ read -p1 line $ echo $line daemon:x:1:1::/: $ ============================= My questions are: 1) How can I determine... 26 Nov 2006 18:41
Rsync --exclude option Is there a simpler way to exclude unwanted Windows files, I'm using this, but I get a headache from typing: --exclude [Hh][Ii][Bb][Ee][Rr][Ff][Ii][Ll][.]][Ss][Yy][Ss] \ --exclude [Pp][Aa][Gg][Ee][Ff][Ii][Ll][Ee][.]][Ss][Yy][Ss] \ --exclude [Dd][Oo]][Cc][Uu][Mm][Ee][Nn][Tt][s]?[Aa][Nn][Dd]?[Ss][Ee][Tt][Tt][Ii][... 22 Nov 2006 19:07
variable substitution into awk commands Have a file $SCRATCH, print lines 1 to 2: $ awk 'NR==1,NR==2' ${SCRATCH} 20061104 0000 0000035901 20061104 0005 0000040269 If I want to assign variables to 1 & 2 above it doesn't parse $ FROM=1 $ TO=2 $ awk 'NR==${FROM},NR==${TO}' $SCRATCH awk: cmd. line:1: NR==${FROM},NR==${TO} awk: cmd. line:1: ^... 18 Nov 2006 00:44
remove several lines from a file Is there a way to remove several lines from a file (using e.g. sed or perl) where the lines have a pattern beginning with a line-feed and pattern and ending with a line-feed and blank-line? It would be the the exact opposite of the awk command: awk '/^firstpattern/,/^$/' myfile Many thanks. ... 13 Nov 2006 10:49
Ambiguous output redirect My script creates the directory named after the current month that I extract from the date but I get an error message. Any help would be greately appreciated. Janet Heath _________________________________________________________________________________ # /usr/bin/move_mereports # move month-end reports to ... 9 Nov 2006 11:06
compare hits and load average Hi All, I'm looking to put something together that would compare and integrate columns of data from two files. In one file I have load average that I got from sar and prettied up. from file: load_avg date time 1min 5min 15min 2006-11-07 10:00:01 0.02 0.02 0.00 2006-11-07 10:10:01 0.03 0.02 0... 8 Nov 2006 19:19
Finding end of file I would like to know how can we find the end of file when reading from a file using shell script. Basically, I want to read 2 lines using a while loop till it reaches the end of a file. Here is how I am reading 2 lines from the result-data file inside a while loop. do { read line1 ... 7 Nov 2006 15:24
Dug myself into a silly hole I ran 'set -n' at the prompt and now it refuses to execute my commands! Solaris 5.8. Er, how do I get out? I put a couple of jobs in the background and would prefer to bring ths terminal back to life rather than simply kill it. Thanks, Sashi ... 8 Nov 2006 22:58
sed: illegal option -- r when running bibexport.sh Hi, I'm trying to run bibexport.sh on a LaTeX aux file to produce a subsetted .bib file. But when I run ./bibexport.sh it gets as far as creating the new .bib file but doesn't write anything to it. Instead I get the error: sed: illegal option -- r usage: sed script [-Ean] [-i extension] [file ...] sed [-... 30 Oct 2006 12:37
Grab decimal numbers and exponent Hello, I am trying to grab numbers which can be decimals (2.3345) or exponents (10.365E+03 or 110.1132E-10). I am using sed and doing the following for decimals: sed '/\([0-9]*.[0-9]*\)/\1/p' ... which is catching the decimals. How do I modify this to catch the exponential numbers as well? Thanks. -S... 24 Oct 2006 14:22 |