10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Would anyone know how to modify the below, so only the IPv6 address (red) is printed, please?
(in other words, what's between inet6 and the / sign)
ipv6=`/sbin/ifconfig lo0:5 inet6 | grep 'inet6'`
print $ipv6
Currently the output of the above script is:
inet6... (7 Replies)
Discussion started by: chatguy
7 Replies
2. Shell Programming and Scripting
Hello folks,
I am sorting ip address file i have file having ips like
192.168.1.1
192.168.2.2
192.168.1.3
192.168.1.2
192.168.11.1
192.168.1.4
192.168.2.1
I have tried below code
i=1
while :
do
echo $i (8 Replies)
Discussion started by: learnbash
8 Replies
3. Shell Programming and Scripting
Hi I need how to sort string characters
for Example i have a file that contains this data
example string "fan" but i want to display "afn" contained words
"afn" is in sorted format for fan.
File data
faty
gafny
gaifny
dafan
gafnniunt
O/p
gafny
gafnniunt (3 Replies)
Discussion started by: polineni
3 Replies
4. Shell Programming and Scripting
Hi,
i have a txtfile with the format <Nr>tab<word>tab<other stuff>new line and i want to sort the <word>-colum with a perl script.
My textfile:
<Nr>tab<word>tab<other stuff>new line
6807 die ART.Acc.Sg.Fem
6426 der ART.Gen.Sg.Fem
2 die ART.Nom.Sg.Fem
87 auf APPR.--
486 nicht PTKNEG.--... (1 Reply)
Discussion started by: buckelede
1 Replies
5. Shell Programming and Scripting
Hi,
We have files coming in the system and we want to sort it in ascending order with date and sequence.
The file pattern are inbound_crp_date_sequence.xml
example we have file as below:
inbound_crp_20100422_10.xml
inbound_crp_20100422_2.xml
inbound_crp_20100422_3.xml... (2 Replies)
Discussion started by: sreejitnair123
2 Replies
6. Emergency UNIX and Linux Support
Hi All,
Can anyone please help me with the regular expression/code snippet to search for an IP address in a string with Tcl scripting.
Example string
"OSPF_NBRUP OSPF neighbor 16.138.181.15 (realm ospf-v2 e1-0/0/0:37.0 area 0.0.0.0) state changed from Full to Down due to KillNbr"
In the... (6 Replies)
Discussion started by: Mr. Zer0
6 Replies
7. UNIX for Dummies Questions & Answers
I have the following output where I need to sort the second column numerically (starting with IBMULT3580-TD10 and ending in IBMULT3580-TD123)
Drv DriveName
0 IBMULT3580-TD13
1 IBMULT3580-TD18
2 IBMULT3580-TD14
3 IBMULT3580-TD10
4 IBMULT3580-TD11
5 IBMULT3580-TD17
... (8 Replies)
Discussion started by: GKnight
8 Replies
8. Shell Programming and Scripting
I have an array full of string values that need to be sorted, but if a value starts with (regex) 0^ it should be at the beginning of the array. Otherwise the array should be sorted normally using ascii sort.
Please help me create the sub to pass to the sort function. (7 Replies)
Discussion started by: dangral
7 Replies
9. Programming
Hello everybody!
I woul quickly need a function
bool ParseIPString(char*)
that parses a string to check if it's in IP format.
thanks in advance for any help!
best regards,
nadiamihu (1 Reply)
Discussion started by: nadiamihu
1 Replies
10. UNIX for Advanced & Expert Users
Hello all, I have some 20-digit strings - say 1234567890abcdefghij
I want to remove the 3rd and then the 11-18th strings, but leave a space between the two resulting strings
eg "3 abcdefgh"
I only know how to use "cut", does anyone know any way I can do this? All these strings are in the same... (14 Replies)
Discussion started by: Khoomfire
14 Replies