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...
Thank you for feherke for helping me but I still have problem getting individual value.
I have a test file with contains the content as follow
aaa||bbb||cccddd333||111
when I run
awk -F '||' '{print $1}' test2.dat
it gave entire string back. How can I get individual value?
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...
I found this function on tek-tips and it works great.
function Is_Oracle_OK
{
if print "
select dummy||'OK' from dual;
" | sqlplus -s $APP_USERNAME/$APP_PASS@$SID | grep -q XOK
then return ${UP}
fi
return ${DOWN}
}
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.