Search Results

Search: Posts Made By: gokcell
2,423
Posted By gokcell
Python can help you
Hi,

This simple python script can help you.

[goksel@gokcell ~]$ cat a_b
#!/usr/bin/python
import sys
f1=open(sys.argv[1])
f2=open(sys.argv[2])

s1=set(f1)
s2=set(f2)

for i in...
1,155
Posted By gokcell
Count to lines
Hi,

This can help you,

cat file1
tony,1,x
tony,1,x
tony,2,x
tony,2,x
tony,3,x
tony,4,x
tony,5,x
adam,1,y

cat file1 | sort | uniq -c | awk '{print $2"\t""COUNT"$1}'
adam,1,y ...
2,495
Posted By gokcell
Sed usage in SunOS
Hi,

I think below sed usage can help you

uname -a
SunOS ams2 5.10 Generic_144488-09 sun4v sparc SUNW,T5240
cat >deney
Goksel Yangin
Goksel Yangin
^Z
[1]+ Stopped cat...
2,447
Posted By gokcell
Paste is one of the easy solution
Parse all of your required line to different file with awk and then join all of your file with the paste command. With the paste command you can use any kind of seperator also. In this example i used...
3,634
Posted By gokcell
Duplication Analyses
Hi,

I think below duplication analyses can help you.
[goksel@gokcell 2july]$ cat file1
Goksel Yangin
Deneme Test
Goksel Yangin
Deneme Test
Ali Veli
Hasan Huseyin
Test 12345
Unix Linux...
3,361
Posted By gokcell
Calculation Duration
Hi,

You can use $SECONDS parameters instead of date command.

start=$SECONDS
............
..........
...............
end=$SECONDS

echo "Calculation Duration: $((end - start)) secs."

...
2,952
Posted By gokcell
awk '$1>=70'
Assume that your data1 is like that

45 Deney
78 Selam
101 Hi
25 Hello
1
2
3
4
5
67
8
9
125
122
20
30
40
50
8,390
Posted By gokcell
Split with sed and awk, log method
Try this log and easy method

sed -e 's/{/ /g' | sed -e 's/}/ /g' | awk '{print $4}'

Regards,
Goksel Yangin
Computer Engineer
5,429
Posted By gokcell
Compare with Python Script Language
#!/usr/bin/python
import sys
f1=open(sys.argv[1])
f2=open(sys.argv[2])
s1=set(f1)
s2=set(f2)
for i in s1.difference(s2):
print i

Assume that script name is a_b
Usage: ./a_b file1 file2...
1,600
Posted By gokcell
FTP automatipn with Ksh
Hi , Below script can help for the FTP Automation

*****************************************
#! /usr/bin/ksh
HOST=Enter_FTP_Server_IP_Here
USER=Enter_FTP_Server_Username_Here...
12,707
Posted By gokcell
Hi, You can use below code in your script. ...
Hi,

You can use below code in your script.
start=$SECONDS;sleep 5; end=$SECONDS;echo Difference:$((end-start))
Difference:5

Regards,
Goksel Yangin
Computer Engineer

Please use code tags...
Forum: Programming 12-04-2011
3,663
Posted By gokcell
Expect with function
Hi,

Try below things.

#!/usr/local/bin/expect --
set timeout -1
if {$argc <6} {
puts "Usage: stp_priority <switch_ip> <ts_port> <stp_vlan> <port1> <port2>"
} else {
...
7,605
Posted By gokcell
Animation Ping on Solaris Like Cisco Ping
Hi,

I develop simple animation ping script on Solaris Platform. It is like Cisco ping.

Examples and source code are below.

bash-3.00$ gokcell 152.155.180.8 30
Sending 30 Ping Packets to...
20,040
Posted By gokcell
Hi, Another solution is below. Put all of...
Hi,

Another solution is below.
Put all of your ip address to multiple.txt than run script gokku

Script Code is below. Script is going to sent only one ping packet to remote node. If reply...
Showing results 1 to 14 of 14

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