Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gargamel100

    VLAN trunking between cisco switch and router

    Hi all, I need your help, really I do not know what I am doing wrong. I use The Boson Netsim v.6 as tool while prepare my CCNA exam. I connected network like ;;;;;;Router;;;;; /e0 / / / 0/1 ;;;;;;switch;;;;; 0/2 / / 0/3 /...
  2. gargamel100

    Tailing ? in directory name opened by perl program. How avoid this?

    Hi all, I am not some perl specialist and I have following code #!/usr/bin/perl -w print ( "Enter the name of new directory\n"); $dir=<stdin>; mkdir ("$dir",0777); chdir ("$dir"); print (" New directory is created and has name $dir\n"); print (" Enter the name of new file\n")...
  3. gargamel100

    date +%b = Aug, how get one month before, eg. Jul

    Hi all, date +%b produce Aug what to do to with "date" to get one month before, in this case Jul thanks in advance
  4. gargamel100

    How add input value to some varieble in awk program

    Hi all, this is probably funny for some of you but I do not know what to do. I have read b awk -v $b;FS="|" ' $4 == "202" && $9 == $b && $15 == "106" {print $1 "0"962$9, "0"$11 " " $23} ' /temp/test/test.txt > test1.txt I want to enter some value from keyboard and add it to varieble...
  5. gargamel100

    Transfering most recent file every time from an directory

    HI all, I need your help if someone can can help :) In an directory I have -rw-r--r-- 1 ggggg ggggg 196846 2007-04-04 19:46 rrrrr_20070404214503_44538.txt -rw-r--r-- 1 ggggg ggggg 192037 2007-04-04 20:02 rrrrr_20070404220002_44539.txt -rw-r--r-- 1 ggggg ggggg 182503 2007-04-04 20:16...
  6. gargamel100

    Insert values from one file to other, but only specific column

    Hi people, I need your help if somebody know how to do this I have file like let's say fileA $11 !~ /^6(1|2)/ && $9 == "2222 " {sum1 = sum1 + $19 } $11 !~ /^6(1|2)/ && $9 == "80205" {sum15 = sum15 + $19 } $11 !~ /^6(1|2)/ && $9 == "80206" {sum16 = sum16 + $19 } $11 !~ /^6(1|2)/ && $9 ==...
  7. gargamel100

    Printing just lines in column that are longer than 9 ciphers

    Hi peple, I have column like 324234234 424234234 424234324 543543545 535454355535 5345454354 5345454355555 545435435 Using awk I can print this column but, I need only to print out lines that are longer than 9 ciphers. Will help me a lot if someone know how make this using awk/ Regards
  8. gargamel100

    cd to directory and how make it connected to for loop?

    Hi all, using the line bellow ls -l | awk ' { if ( $8~/^(0|1|2|3)/) print $8 }' I have output like 01 02 03 04 05 06 07 08 09 10 11 12 and so on .... this is column which represent days of month. I wish if it is possible using script that will cd 01 then in that directory do d=`TZ=MET+24...
  9. gargamel100

    How change particular word by another in this file ?

    Hi all, I have the following file output (2, 1, 'rambo', 'ffsffsdfsdfsd1daf15edf96ec03a4e977a12aa', 1131101341, ..... (3, 1, 'rambo1', '9fsdchyth4354547f4a1787aad393142', 1149053489, 0, ........ This is output of forum mysql database. .... means that there is some additional fields but...
  10. gargamel100

    Nesting in Ruby code?

    Hi people, I started to learn Ruby programming and I wtite ruby programs using vi editor. When I write and hit enter I go to next line and I got program code like line1 line2 line3 ... ... Is there any feature in ruby or vi to get program code like line1 line2 line3 line4 ...
  11. gargamel100

    An error in if else loop, your opinion

    Hi all, using code bellow I want to check if $21=="1" and $9=="2222". If this is true then print 2222, and value for a. awk -F"|" ' $21 == "1" && $9 == "2222" {a=a+1} END {print " 2222 ", a}' But in some cases a is equal 0 and in that case END {print " 2222 ", a} will...
  12. gargamel100

    How write data from awk output into different files?

    Hi all, usnig this part of code cat 942prm_200611* | tr ' | ' ' ' > 942sve.txt awk ' { if(( $10=="30001") && (($22=="34") || ($22=="128") || ($21=="31"))) print $10 "\t" $22 }' 942sve.txt > jacause.txt awk ' { if(( $10=="30350") && (($22=="31") || ($22=="128") || ($22=="16"))) print $10...
  13. gargamel100

    Turning columns into rows in awk?

    Hi people, this may be very easy or not but I can not solve this myself. Output of one my awk script is as follow case 1: 9440000 0 9004407 9 9000668 11 9000669 20 9001740 935 but I wish I can make it using awk ( to pipe this to some another awk script ) to look like case 2...
  14. gargamel100

    How count values in awk program based on number of occurance

    Hi all, I have some huge file and I want to check it on some values so I wrote script bellow ################################################################### cat 942prm_$d | tr ' | ' ' ' > prm942_$d.txt # to translate | into empty space d=`TZ=MET+24 date +%Y%m%d` # date # And awk...
  15. gargamel100

    How join two scripts into one?

    Hi people, I have two scripts which works ok, but I wish I can join them into only one scripts. The scripts are (first) ############################################################## awk -F"|" ' BEGIN { print "" } $21 == "28" && $9 == "90000555" {t=t+1} $21 == "28" &&...

Part and Inventory Search

Back
Top