Search Results

Search: Posts Made By: gokcell
1,922
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...
976
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,076
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...
1,809
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...
2,675
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...
2,862
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,354
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
7,369
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
4,523
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,256
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...
10,840
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-03-2011
3,565
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 {
...
6,132
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...
19,029
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 03:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy