Search Results

Search: Posts Made By: digioleg54
2,181
Posted By digioleg54
1.Darwin Olegs-iMac.local 17.6.0 Darwin Kernel...
1.Darwin Olegs-iMac.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
MacOS High Sierra
2.ksh is /bin/ksh
3.vi
4. Script is very...
2,181
Posted By digioleg54
Sorry, But I said that option -i is not working...
Sorry, But I said that option -i is not working for me.

In your line the ksh shell script doesn't understand "mv" command.


Any advise on this?


Thanks for contribution

---------- Post...
2,181
Posted By digioleg54
Above mentioned -i option is not working ...
Above mentioned -i option is not working



sed -i '2s/, ,/,1,/1' $CONTROLFILE

gives error below


sed: 1: "VPAS.TRANS_HDR.20180724 ...": invalid command code V



I am working on iMac...
2,181
Posted By digioleg54
How to change comma delimeter in the file to number?
I have a file

H,20180624200732,VPAS,TRANS_HDR,20180724,
VPAS.TRANS_HDR.20180724.01.txt, ,93,
T,1,


I have to change and instead first comma put ",1" like below


...
966
Posted By digioleg54
I insert variable: cnt=`wc -l $CONTROLFILE |...
I insert variable:

cnt=`wc -l $CONTROLFILE | awk '{print $1}'`
sed '2s/^/$cnt/' $CONTROLFILE




And no result.
Please advise


Thanks for contribution

---------- Post updated at...
966
Posted By digioleg54
Add to the second line of the file first character
I have a file:

H,20180620093911,VPAS,TRANSHDR,20180620,VPAS.TRANS_HDR.20170731.01.txt,
,876,496737dd53431ef666cad1a3511b3c5a8912f505bf6edfb9d0e225fb049ce934,
T,1,



I need to add to the...
1,049
Posted By digioleg54
It works, but I have a Korn shell. Are you sure...
It works, but I have a Korn shell. Are you sure it will work with Korn shell?
I believe I can use `awk -F"." {'print $5.$4.$3.$2'}`


str%. works because of #!/bin/ksh at the beginning of the...
1,049
Posted By digioleg54
How to get first four parts of the string?
I have the string:

XXXX.YYYY_ZZZ.20180724.01.txt


I need to get rid of .txt and get full four parts

XXXX.YYYY_ZZZ.20180724.01



I did:

CTL=`echo XXXX.YYYY_ZZZ.20180724.01.txt | rev...
2,417
Posted By digioleg54
The last loop doesn't support KSH. Better is...
The last loop doesn't support KSH.
Better is the following:



for file in $(cat file_name.txt)
do
print "FILE is $file"
done




Thanks for contribution
2,417
Posted By digioleg54
Read the file line by line and do something with lines
I have a file


file_name_O.txt



The file can have different number of other files names or nothing
I will check


cnt=`wc -l file_name_0.txt`
if [ "cnt" -eq "0" ];then
exit 1...
Forum: AIX 12-29-2017
2,522
Posted By digioleg54
Error when run makefile to compile C program
I have a make file for C program, which always gives the error


ld: 0711-738 ERROR: Input file ../src/file_name.o
XCOFF32 object files are not allowed in 64 mode


Does anybody know the...
Forum: AIX 12-27-2017
2,482
Posted By digioleg54
AIX full path to socket library
Can somebody help me too identify full path to socket library on AIX? Cannot find anything

Thanks
for contribution
1,019
Posted By digioleg54
Shell function parsing arguments, which didn't receive. Why?
I have a shell script, which has a function, which call a perl script. Also it has a shell function call parse_ars as fogllow:

#!/bin/ksh

load_ici_dat() {
cd ${OUTPUT_DIR}
typeset...
789
Posted By digioleg54
+x is for debugging
+x is for debugging
789
Posted By digioleg54
Different between first line in the shell script
What is the different between

#!/usr/bin/ksh

and

#!/usr/bin/ksh -x


Thanks for contribution
1,849
Posted By digioleg54
I am doing it now. Thank you
I am doing it now.

Thank you
1,849
Posted By digioleg54
I will convert several scripts to Perl and we...
I will convert several scripts to Perl and we will move them to different server. So there is no impact on others.

Thank you for your advise. I appreciate it.
1,069
Posted By digioleg54
Strange third argument in shell function
In one of my shell function I found the following


set_default_values () {
prog=$1
PROC_DT=$2
RESET_ALL="${3-N}"
#echo "Processing date as passed = [$2],...
1,849
Posted By digioleg54
this is a very old shell program, which I convert...
this is a very old shell program, which I convert to Perl. And as I said, there is no arguments shell script receives
1,849
Posted By digioleg54
ok, thanks
ok, thanks
1,849
Posted By digioleg54
The script start Perl script with several...
The script start Perl script with several arguments. The Perl script or cerate report or update database
below is parse_args function

parse_args () {
echo "VARVAR $#"
if [ $#...
1,849
Posted By digioleg54
The shell script doesn't get arguments, but parse them
Hello,
I have a simple shell script, which starts from crontab like this:

00 03 * * 2-6 /export/applications/dte/sh/fwmarg.sh > /export/applications/dte/data/cron_log/fwmarg.cronlog.`date...
2,977
Posted By digioleg54
rovf, all our scripts are using I/O, we are...
rovf, all our scripts are using I/O, we are reading files or getting data from database and cerate reports, some - small, some - huge.

RudiC echo $0 gives me -ksh
If we have bash installed, I...
2,977
Posted By digioleg54
the script below: #!/bin/ksh ...
the script below:

#!/bin/ksh

NAME=`basename $0 .sh`
Today=`date '+%Y%m%d'`
TIMESTAMP=`date +%H:%M:%S`
LOCAL_SERVER=`hostname`
let countcla=0
countcla=`expr ${countcla} + 1`
echo...
2,977
Posted By digioleg54
When I test bash command, the script doesn't give...
When I test bash command, the script doesn't give an error, it just doesn't print value

MYSHELL=$(ps -hp $$|awk '{echo $5}')

print

MYSHELL IS


I believe it is ksh
Showing results 1 to 25 of 112

 
All times are GMT -4. The time now is 12:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy