Search Results

Search: Posts Made By: vikus
6,663
Posted By vikus
Expect return code
Hello everyone
Can some help me with understand return code in expect

#!/usr/bin/expect

set timeout 1

set SRV [lindex $argv 0]
set user [lindex $argv 1]
set pw [lindex $argv 2]

spawn...
1,064
Posted By vikus
Run scripts in background one by one
Hello all,
Can someone help with one script?

I have as example 3 scripts
1.sh

sleep 60 &
sleep 60 &
sleep 10 &
sleep 80 &
sleep 60 &
2.sh

sleep 40 &
sleep 5 &
sleep 10 &
sleep 70 &...
1,087
Posted By vikus
awk manipulation
Hello all,

Can someone help me with write part of code in awk to merge 2 files?

Go through file1 check if number from column 3 exist in file2(column 2) if yes take value from column 1 and add...
1,200
Posted By vikus
Perl find and add to column
Hi,
Could you help me with script in perl

;A1;AAA;%/A/B;70;75;-;
;A1;AAA;%/A/C;70;75;-;
;A1;BBB;%/A/G;70;75;-;
;A1;BBB;%/A;70;75;-;I would like to find line with '%/A' and put in that line in...
1,361
Posted By vikus
awk join 2 files
Hello All,

file1
A1;B1;C1;D1;E1;F1;G1;H1;III1;J1
A2;B2;C2;D2;E2;F2;G2;H2;III2;J2
A3;B3;C3;D3;E3;F3;G3;H3;III3;J3
A4;B4;C4;D4;E4;F4;G4;H4;III4;J4file2
III1 ZZ1 S1 Y 1 P1 ...
823
Posted By vikus
awk manipulation
hello
I have example file

AA 11
BB 22
CC 33


And what I expect to have

-a AA=11 -a BB=22 -a CC=33


can anyone help how I have this using awk?
2,546
Posted By vikus
my @list=split(/;/, "a;b;c;d;e"); foreach my...
my @list=split(/;/, "a;b;c;d;e");

foreach my $val (@list) {
print $val ;
}

I have someting like this, how to assigned to value this what is printed?
2,546
Posted By vikus
Perl split string separated by special character
Hello

I have string (string can have more sections)
LINE="AA;BB;CC;DD;EE"I would like to assigne each part of string separated by ";" to some new variable.

Can someone help?
1,004
Posted By vikus
awk 2 files
Hello
I have 2 files

file1
/tmp/xxx
/tmp/yyy
/tmp/cccfile2
/tmp/aaa
/tmp/ccc
/tmp/yyyI would like have output
/tmp/aaa - NO So check all entries from file1 in file2 and if entry from...
1,180
Posted By vikus
[perl] execute remotely script
Hello
Can some help with write part of perl script
I need something like this in perl

SSH="/bin/ssh -o BatchMode=yes -o"
USER="test"
SRV="server"
SCRIPT_TO_EXEC="/tmp/test.sh" -> shell script...
1,904
Posted By vikus
great working as should be, Thank you. could you...
great working as should be, Thank you. could you please explain how exactly this is working?
1,904
Posted By vikus
awk 2 files
Hello All

file1
XXX 801;ZZZZZZZZZZ;XXX 5830;WWWWW11;
XXX 801;ZZZZZZZZZZ;XXX 5829;FFFF1111;
XXX 212;DDDDDDDDD;XXX 5855;GGGG1111;
XXX 212;DDDDDDDDD;XXX 5854;HHHH222;
XXX 212;DDDDDDDDD;XXX...
1,531
Posted By vikus
awk output
hello all

input file
AAA: XXX1
CCC: DD SS
SSS: SSS1
BBBB: ASAS
ZZZ: ZZZZZ1
XXX: XXXXXXXXXXXXXXX1
PPPP: PPPPPP1
RRRR: 111111111
ZZZ: ZZZZZ2
XXX: XXXXXXXXXXXXXXX2
PPPP: PPPPPP2...
1,212
Posted By vikus
awk new line
Hello all,

input file
AA1 XXX1
BB1
1 DD1 CC1 FF1
2 DD2 CC2 FF2
3 DD3 CC3 FF3
4 DD4 CC3 FF4

AA2 XXX2
BB2
1 DD5 CC5 FF5
2 DD6 CC6 FF6
3 DD7 CC7 FF7
4 DD8 CC8 FF8output
XXX1 CC1 CC2...
4,320
Posted By vikus
It's working, Thank you!
It's working, Thank you!
4,320
Posted By vikus
awk merge two files
file1
AAA3:WWW1:DDD1:XXX8:DDD2:XXX9
AAA6:WWW2:FFF1:XXX130:FFF1:XXX104:FFF1:XXX16
AAA7:WWW3:ZZZ1:XXX4:ZZZ2:XXX5:ZZZ3:XXX6:ZZZ4:XXX7file2
XXX8:EEE1:EEE2
XXX9:KKK1:KKK2
XXX130:OOO1:OOO2...
1,814
Posted By vikus
Working exactly as should be, Thank you.
Working exactly as should be, Thank you.
1,814
Posted By vikus
that would be all, no more conditions ;)
that would be all, no more conditions ;)
1,814
Posted By vikus
Thank you all Now some more condition if value...
Thank you all
Now some more condition if value from fileB have no any more columns, add to fileA string "NA:NA"

I have 2 files:

fileA
AAA1:AAA2:AAA3:AAA_4:AAA5:AAA_6:AAA7:AAA_8...
1,814
Posted By vikus
Join two files
I have 2 files:

fileA
AAA1:AAA2:AAA3:AAA_4:AAA5:AAA_6:AAA7:AAA_8
BBB1:BBB2:BBB3:BBB_4:BBB5:BBB-6
CCC1:CCC2:CCC3:CCC_4fileB
AAA_4:XXX1:YYY1
BBB_4:XXX2:YYY2
CCC_4:XXX3:YYY3:ZZZ3...
3
2,879
Posted By vikus
ok i found solution: ls | xargs -i ksh -c 'echo...
ok i found solution:
ls | xargs -i ksh -c 'echo file: {}; ls -la {}'
3
2,879
Posted By vikus
Xargs
Hello, I need some help with xargs
$ ls
aaa bbb ccc ddd$ ls | xargs -I{} ls -la {}
-rw-rw-r--. 1 xxx xx 0 May 30 20:04 aaa
-rw-rw-r--. 1 xxx xx 0 May 30 20:04 bbb
-rw-rw-r--. 1 xxx xx 0 May...
2,508
Posted By vikus
it's possible do with awk ?
it's possible do with awk ?
2,508
Posted By vikus
@daWonderer...
@daWonderer (https://www.unix.com/members/302071838.html) split after every table location pointing to 4th column.
@michaelrozar17 this will not work if i will have more if i have more strings
2,508
Posted By vikus
String manipulation
Hello

Could you help with small script:
How to split string X1 into 3 string
String X1 can have 1 or many strings

X1='A1:B1:C1:D1:A2:B2:C2:D2:A3:B3:C3:D3'

This is output which I want to...
Showing results 1 to 25 of 34

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