Search Results

Search: Posts Made By: Chirel
1,522
Posted By Chirel
Hi, maybe this could work for you. awk ' ...
Hi, maybe this could work for you.


awk '
BEGIN { print "create service_group TEST"; }
{ print "create service_group TEST \x27\x27 services:tcp"$1 }' port.txt
1,127
Posted By Chirel
Hi, If what you want is to compare line 1 of...
Hi,

If what you want is to compare line 1 of each file then line 2 of each file etc, then the code is wrong.
The code you show compare line 1 of file1 with all lines of file2 and then same for...
5,178
Posted By Chirel
Hi You have empty lines in the files that's...
Hi

You have empty lines in the files that's why you have comma in the "wrong" place.
To add the count and have the output you want change the code to

perl -lane '$c{"$F[4] $F[5]"}++;...
17,900
Posted By Chirel
Hi Maybe that's what you mean ? $...
Hi
Maybe that's what you mean ?


$ Table_1=tbl1_c1
$ Table_2=tbl2_c1
$ Query='$Table_1 Join $Table_2'
$ echo $Query
$Table_1 Join $Table_2
$ eval echo $Query
tbl1_c1 Join tbl2_c1
1,459
Posted By Chirel
Hi Something like that ? awk '{if...
Hi
Something like that ?

awk '{if (match($0,/Campbell/)) print; else { if (p) print p; p=$0 } } END {if (p) print p}' songs
1,076
Posted By Chirel
Hi, Alister you are right, even if this...
Hi,

Alister you are right, even if this solve the problem it's not user friendly, so here is the readable version :)

First take only company name and the A/B status and we sort them


# awk...
2,977
Posted By Chirel
Hi, #!/bin/bash ...
Hi,


#!/bin/bash

apachever=$(/usr/local/apache/bin/httpd -v | head -1 | awk '{print $3}' |cut -d/ -f 2)
minval=$( echo -e "$apachever\n2.2.17" | sort -n -t . -k 1,1 -k 2,2 -k 3,3 | head -1 )...
14,026
Posted By Chirel
Hi find . | egrep...
Hi


find . | egrep '.*_[0-1][0-9][0-3][0-9].(c|cpp)$'
2,878
Posted By Chirel
Hi, check this #!/bin/bash ...
Hi, check this


#!/bin/bash

>extra.txt
>mismatch.txt
while read sLine; do
OFS="$IFS"
IFS="|"
sTab=( $sLine );
tLine="$(egrep "^"${sTab[0]} target.txt)"
if [ -z...
1,596
Posted By Chirel
One last version just for fun that will create...
One last version just for fun that will create nastran1.bdf.deleted and nastran1.bdf.new


awk '/^[A-Z]/ { k=match($1,/RBE/); } { print >((k)?FILENAME".deleted":FILENAME".new"); }' nastran1.bdf
3,019
Posted By Chirel
This will print each line of the file ($0)...
This will print each line of the file ($0) prefixing with the filename justified on 50 char max.
3,019
Posted By Chirel
That's the idea i'm trying to do. prefix...
That's the idea i'm trying to do.

prefix each line of all file with "filename : ", then sort from field 3 to end
then uniq -d on the result ignoring the x chars at the start of lines.
The...
3,267
Posted By Chirel
hi
hi
1,977
Posted By Chirel
Hi cat list.txt ^New$ ^Old$ cat...
Hi

cat list.txt
^New$
^Old$
cat data.txt

New
New York
NewYork
DC
LA
Chicago
Dallas
Using the command now

$ grep -f list.txt data.txt
New
$
2,796
Posted By Chirel
Hi sed "s/-sec.*access=//; s/:/ /g"...
Hi

sed "s/-sec.*access=//; s/:/ /g" /etc/exports
3,837
Posted By Chirel
Hi, maybe sed is a better reply to that...
Hi,
maybe sed is a better reply to that something like
sed "s/|/,/g; 2d" $@ >$@.csv
2,680
Posted By Chirel
Hi, i never use expect so i can't help you...
Hi,

i never use expect so i can't help you on this, but there another way to solve that.

Use the call
ssh -o StrictHostKeyChecking=no $user@$ip

This way it will never ask you and auto add...
695
Posted By Chirel
Hi, Try echo $(ls)
Hi,

Try

echo $(ls)
1,429
Posted By Chirel
For a new problem, please make a new post.
For a new problem, please make a new post.
3,019
Posted By Chirel
Hi, awk ' function multi(number) { ...
Hi,


awk '
function multi(number) {
return number * 3
}
BEGIN{print multi(4);}'
1,816
Posted By Chirel
Hi, Try this $memcnt = 5; $passt =...
Hi,

Try this

$memcnt = 5;
$passt = "ship";
$cnt1 = 0;
open (ADVOUT, "< $chpdvlst") || die ("can not open file: $chpdvlst!");
while (($LINEIN2 = <ADVOUT>) && ($cnt1 < $memcnt)) {

...
5,952
Posted By Chirel
Hi, In my understanding for a counting...
Hi,

In my understanding for a counting semaphore (which allow an arbitrary resource count), V is = signal() and P = wait().
5,952
Posted By Chirel
Right, no data buffers for signal, it's used to...
Right, no data buffers for signal, it's used to tell something coded by a number to a running process.

You can send a running process a signal, it's for example the work done by the kill command.
12,492
Posted By Chirel
Hi, Just search this on the forum before...
Hi,

Just search this on the forum before asking (https://www.unix.com/shell-programming-scripting/23859-how-get-weekday-given-date.html) :)
2,102
Posted By Chirel
Hi, just add ;; a the end of the line with error.
Hi, just add ;; a the end of the line with error.
Showing results 1 to 25 of 36

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