Search Results

Search: Posts Made By: arun_maffy
2,106
Posted By Corona688
# Before the program is run, set the variable n...
# Before the program is run, set the variable n to the value "POINT"
-v n="POINT"

# For every line containing % somewhere:
'/%/ {
# Print the entire line, followed by a newline,...
6,330
Posted By DGPickett
PERL draws input from the keyboard, a file, or a...
PERL draws input from the keyboard, a file, or a library references in a file, but it is all pretty much the same to PERL. Whatever PERL commands you want to run, that code can all be sent down the...
3,158
Posted By pludi
Expect will work with any prompt you throw at it,...
Expect will work with any prompt you throw at it, as long as you can properly define it. But for SQL operations I'd rather suggest using DBI (http://dbi.perl.org/) instead.
3,232
Posted By Tytalus
should be perl -pe 's/(abc.*)/\1.txt/' ...
should be


perl -pe 's/(abc.*)/\1.txt/'


iirc
3,232
Posted By durden_tyler
$ $ # The data file $ cat -n f3 1 ...
$
$ # The data file
$ cat -n f3
1 abcdefghij
2 the quick brown fox abc
3 yet another line
4 abcdef abcdef abcdef
5 the abc quick brown abcd fox abcde
$
$ #...
10,723
Posted By frans
That's what i understood. Therefore, the shift...
That's what i understood.
Therefore, the shift $(($OPTIND - 1)) command sets the first parameter after the options as $1, no matter the number of options.
You must call the script with the usual...
7,261
Posted By m1xram
with sed
find /usr -type d -name '6*' 2>/dev/null | sed 's/.*\///'
7,261
Posted By clx
But that is the filename ( not the directory name...
But that is the filename ( not the directory name as you mentioned in your previous post)
Or they are?

try this:

find /usr -name "6*" -type f 2>/dev/null | awk -F "/" '{print $NF}'
7,261
Posted By hergp
Try find /usr -name "6*" | sed...
Try

find /usr -name "6*" | sed 's/\(.*\)\/.*/\1/'
9,927
Posted By cfajohnson
That's not very reliable: BITTER=qwerty...
That's not very reliable:


BITTER=qwerty
SUBSET_BIT_NUM=TER
IFS=E
eval echo '$BIT'$SUBSET_BIT_NUM ## unreliable
eval echo "\$BIT$SUBSET_BIT_NUM" ## correct


The output is:

...
8,022
Posted By jlliagre
This script will continuously load one CPU at...
This script will continuously load one CPU at roughly 100%:
#!/bin/ksh
while true
do :
done
Forum: UNIX and Linux Applications 11-14-2007
48,604
Posted By prowla
If you want to collapse every three lines into...
If you want to collapse every three lines into one, you could try:
cat myfile | paste - - -
Showing results 1 to 12 of 12

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