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 bkrike 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: vuakhobo
  • Content: Threads
  • Order by date
  1. vuakhobo

    Need help on how to cut string on a log file

    I have a log file that contain a line below from sftp log sftp> ls -lrt drwxr-xr-x 1 22802 118581 96 Sep 12 12:24 sshkeys -rw-r--r-- 1 0 0 2 Sep 28 17:48 epsout.Hi there you.txt sftp> exit Because there is a space in filename, my command below failed cat...
  2. vuakhobo

    how to parse data with || as delimeter

    Hello expert, I have file with || as delimeter I need help how to parse data with || as delimeter cat test1|cut -d'||' -f1 <- is not working. is there a way to get it done?
  3. vuakhobo

    Is there a better way do this?

    I have a job_list.dat contains say 5 jobs (a b c d e) if job b failed at first run I want to produce a re_run.dat only contains 4 jobs (b c d e) I have written a code below. Can some one show me to do the same thing in awk ? Here is my code set -A list $(cat $job_list) a=0 while [ "$a" -lt...
  4. vuakhobo

    Is there a better way do this?

    My grep commands are working but is there a better way to do this? inputfile has start3 start start123 start3 startuser changeme start3 hello donut start-id=$(grep start inputfile|grep -v startuser|grep -v hello|awk '{print $2}') start-pass=$(grep start inputfile|grep -v startuser|grep -v...
  5. vuakhobo

    Is there a better way approach this?

    I have a very large file that comes to us daily but unfortunately that there is an error and produce quite a bit of reject in the reject.dat file The error is that there is .n after HH:MM:SS where n could be ANY DIGITS I used the command below to grep for the parttern where n has 1 digit grep...
  6. vuakhobo

    Is there a way to check existence file on sftp

    Hello, Is there a way to check existence file on sftp? Thanks in advance.
  7. vuakhobo

    Is there a way to code in ksh to save result into different tab in exc

    Is there a way to code in ksh to save result into different tab in excel ? For example: result 1st run save into sheet1 result 2nd run save into sheet2 result 3rd run save into sheet3 Right now I can only save into one Excel and use cut and paste later in excel to...
  8. vuakhobo

    Looping checking for byte count

    GOAL: 1.Monitor remote server's folder for file(s) 2.Check and make sure file is completely copy over to the folder before sftp to another server. Here is my reasoning. 1. Take a snap shot at current folder for list of file(s). (say we have 3 files) 2. Base on that list, get 2 reads of...
  9. vuakhobo

    Cron: run first Thursday of every month

    Is there a way to set job to run first Thursday of every month? I found this on other thread and wonder if it is correct? 0 2 * * 4 [ `date '+%e'` -le 7 ] && run_script.sh
  10. vuakhobo

    awk -F: '{ print length() }' test.dat | sort -u

    Hello all, I need little help. I have a flat file called test.dat with 4 lines in it: fddkdjfdkdkfkdf ddd fddkdjfdkdkfkdf ddddd when I run awk -F: '{ print length() }' test.dat | uniq -c the result show: 1 15 1 3 1 5 What I really want is if the line have the length increment the count. The...
  11. vuakhobo

    cat &lt;filename&gt; |wc -l

    I have huge file, a smallest one is about 9GIG of data that needs to verify how many records in the files after sftp from the client. Currently I use cat <filename> |wc -l to get the job done. I was wondering is there a better of doing it.
  12. vuakhobo

    Help on option

    I have this issue that I can't resolve and need help on. Currently I can kick off the script 2 two ways: with 4 args like: scan_n_cktrl.sh F133 2 5 915 OR scan_n_cktrl.sh -f F133 -r 2 -w 5 -t 915 But I can't combine 2 methods together to kick the scrip like this scan_n_cktrl.sh F133 2 -w 5 -t...
  13. vuakhobo

    Need help on adding float number

    I have main program calling Run_Time function which return number of minutes in decimal point. I tried to add the total minutes but having problem with it. Can someone help me ... example: pmart@satpai30:/vframe/STRODS/indata/log>file_detail.sh F381 F382 3.42 minutes to load F381...
  14. vuakhobo

    monitor latestfile with timestamp

    Current time: 11:11 is there a way to monitor file that come after 11:11? I used ls -lart|tail -1 .it only show the latest file
  15. vuakhobo

    sort 2 columns

    #!/usr/bin/ksh ##################################################### #The purpose of this script is to tell how long does #it take for a specific cube to run,cube status, #Estimate time hit calc and Estimate complete time. ##################################################### . ~/.env...
  16. vuakhobo

    Return Code

    In Perl I can do statement below. $ValueA=Sum(3,4); print "Value:$Value"; Is there away that I can do just like statement above in shell. I know return and $? in shell but is there an easy way to do it?
  17. vuakhobo

    Append new record with existing Array

    Is there a way to append new record at the end of the existing array?

Part and Inventory Search

Back
Top