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 Chriss Miller 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: *

  • Users: ogniemi
  • Content: Threads
  • Order by date
  1. ogniemi

    a shell builtin command in watch?

    because I can't find any command replacement to the built-in 'history' command, I'd like to ask you if can use watch + history to continuously view history changes with date: root@test:~# history|tail -2 598 17/11/15 14:23:48 :: HISTTIMEFORMAT="%d/%m/%y %T :: " 599 17/11/15 14:23:54 ...
  2. ogniemi

    getting rsa key fingerprints

    I can get fingerprints of all keys authorized in authorized_keys but only using temporal file (here "line"), like: cat au*s|while read a;do echo $a >line;ssh-keygen -l -f line;done (unfortunatelly, command: "ssh-keygen -l -f authorized_keys" ignored >1 lines) 1) can the ssh-keygen -l be fed...
  3. ogniemi

    epel on Centos 7

    after I installed EPEL repos yum update hangs with no sense reason: > GET /pub/epel//7/x86_64/repodata/repomd.xml HTTP/1.1 User-Agent: urlgrabber/3.10 yum/3.4.3 Host: fedora.mirrors.telekom.ro Accept: */* Pragma:no-cache * Empty reply from server * Connection #13 to host...
  4. ogniemi

    global change in html source file

    hello, I have a html file with many lines like: <p><font size="1">a1</font></p> <p><font size="1">val1</font></p> </td> <td> <p><font size="1">a4</font></p> <p><font size="1">val2</font></p> </td>...
  5. ogniemi

    AIX can't reduce fs space

    even after successfull defragfs AIX gives up... fs has 290MB used and 1300MB free of total 1600MB # df -vg /repo Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on /dev/mksysblv 1600.00 289.47 1310.53 19% 155 305407221 1% /repo # chfs -a...
  6. ogniemi

    remove new line (\n) from line before matched

    hello example input: aaaa bbbb cccc so when matched line would be bbbb, expected output would be: aaaa bbbb cccc thank you in advance for a short sed/awk code.
  7. ogniemi

    sorting case

    I have input with single filed in each line, like. $ echo "aaa1\naaa2\nbbbbb0\naaa11\nbbbbb10\nbbbbb1\nbbbbb8\naaa9" aaa1 aaa2 bbbbb0 aaa11 bbbbb10 bbbbb1 bbbbb8 aaa9 and can do "by number" sorting in that way: $ echo "aaa1\naaa2\nbbbbb0\naaa11\nbbbbb10\nbbbbb1\nbbbbb8\naaa9"|sort -kn1.4...
  8. ogniemi

    removing duplicate lines ignoring empty lines and lines with #

    hi, how to achieve this without sorting input file? only first occurrence of duplicates should stay. following command found on a site does remove also empty lines and with #es which I don;t want to be removed. perl -ni -e '$s{$_}++||print' file so, lines like: ##### (a whitespace)#(a...
  9. ogniemi

    get &quot;bigger&quot; value combined with a text

    hello, command produces output with many lines as on example: No filesets which have fixes for IV00149 are currently installed. All filesets for IV00151 were found. All filesets for 71-01-031207_SP were found. All filesets for 71-00-041140_SP were found. All filesets for...
  10. ogniemi

    edit/fix a parameter in a config file from command line

    hello, in a config file in which I need to replace (or add if not existing at all) an option. Also, if the option is lead by a space(s) or tab(s) (or such mixed together). Each option is followed by = sign, but there also might be some white characters beetween the option and = sign, but such is...
  11. ogniemi

    &gt; &lt; operators in awk

    Hello, could someone please explain why in examples below awk with $5>"57" returns red line too? With $5<"57" doesn't. $ df -v -g >/tmp/output $ cat /tmp/output Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on /dev/hd4 0.50 0.19 0.31...
  12. ogniemi

    a reliable way to check for exact string occurence in a text file

    delimited by a space(s) or a tab(s). eg. if in a line there is are: u8-23.24.aaa 123.u8-23.24 u8-23.24.333 and want to check exactly for "u8-23.24" (in any field / line) I should get no match for above example line.
  13. ogniemi

    ksh, test

    why the last test doesn't work? expected is true because B=b $ A=a $ B=b $ C=c $ [ $A = "a" -a $B = "b" -a $C = "c" ] && echo true || echo false true $ [ $A = "a" -a $B = "b" -a $C = "b" ] && echo true || echo false false $ [ $A = "a" -a [ $B = "b" -o $C = "b" ] ] && echo true || echo false...
  14. ogniemi

    lines &quot;bigger-equal&quot; ^02...

    a file contains lines beginning with: 00-00:29 00-22:01 120-32:21 01-01:04 00-00:06 00-22:50 00-00:51 00-00:12 00-22:06 00-00:15 01-01:25 00-01:28 00-04:09 01-02:19 00-01:50 00-04:44 00-03:22 04-23:31 00-01:09 00-22:06 00-01:40 00-00:02 00-22:06 00-00:15 00-22:06 00-22:01 00-00:29 00-22:07...
  15. ogniemi

    input processing

    hello, I have following input: line01 ss7000:3000:296 test 00:00:00 07:01:39 07/09/13 line02 ss7000:3000:331 test 00:00:00 07:38:03 07/02/13 line03 ss7000:3000:574 test 00:00:00 04:21:40 07/12/13 line04 ss7000:3000:656 test 00:00:00 11:30:47 07/12/13 line05 ss7000:3000:725 test 00:00:00...
  16. ogniemi

    check string has only a-z0-9

    hello, Example with [[:alnum:]] I found in post http://www.tek-tips.com/viewthread.cfm?qid=1699291 is not working good in case german letters Ä/ä, Ö/ö, Ü/ü are in a string: # echo 243dÜdd|awk '$1 !~ /^[[:alnum:]]+$/ {print "notalnum"}' # echo 243dÜdd|awk '$1 !~ /^[a-zA-Z0-9]+$/ {print...
  17. ogniemi

    replace all tabs, multiple tabs and multiple spaces, white spaces with single space

    hi, the input file text contains multiple spaces, tabs, multible tabs and I need to replace all of them with single space which command removes all leading and trailins spaces: sed "s/^[[:space:]]*//;s/[[:space:]]*$//" I tried to use this for removign white spaces inside the it doesn't do...
  18. ogniemi

    looking for lines...

    hallo, input file (cron log file with lines) - mixed lines like: root : CMD ( /home/den/proc400.ksh >/dev/null ) : PID ( 18940110 ) : Tue Nov 6 21:30:00 2012 root : CMD ( /home/den/clean.ksh full >/dev/null ) : PID ( 53412070 ) : Tue Nov 6 23:30:00 2012 Cron Job with pid: 18940110...
  19. ogniemi

    Compound variable assignment

    Hello, I am looking for equivalent in ksk88 $ ksh93 $ Version M-12/28/93e $ d=(a=1 b=2 c=3) $ print ${d.c} 3 $ in ksh88 it doesn't work in that way: $ Version M-11/16/88f $ d=(a=1 b=2 c=3) ksh: 0403-057 Syntax error: `(' is not expected.
  20. ogniemi

    awk delimeter

    how to explain that awk in red doesn't return version numbers? is it caused by ++- in the variable? is it possible to get it working with the variable? $ A="libstdc++-devel" $ rpm -qa|grep ^${A}-[0-9] libstdc++-devel-3.3.2-5 $ rpm -qa|grep ^${A}-[0-9]|awk -F "${A}" '{print $2}'|cut -d- -f2-...

Part and Inventory Search

Back
Top