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...
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?
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...
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...
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...
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...
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...
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
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...
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.
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...
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...
#!/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...
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.