Search Results

Search: Posts Made By: Chirel
1,495
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,108
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,052
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,610
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,440
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,057
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,936
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 )...
13,991
Posted By Chirel
Hi find . | egrep...
Hi


find . | egrep '.*_[0-1][0-9][0-3][0-9].(c|cpp)$'
2,986
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.
2,986
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...
1,572
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
2,775
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...
3,198
Posted By Chirel
hi
hi
1,947
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,776
Posted By Chirel
Hi sed "s/-sec.*access=//; s/:/ /g"...
Hi

sed "s/-sec.*access=//; s/:/ /g" /etc/exports
3,815
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,654
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...
693
Posted By Chirel
Hi, Try echo $(ls)
Hi,

Try

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


awk '
function multi(number) {
return number * 3
}
BEGIN{print multi(4);}'
1,798
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,918
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.
5,918
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().
2,080
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.
12,448
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) :)
Showing results 1 to 25 of 36

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