Search Results

Search: Posts Made By: SIMMS7400
2,722
Posted By nezabudka
Hi how about? grep '^outbox\/logs\/' temp.txt...
Hi
how about?
grep '^outbox\/logs\/' temp.txt | tail -1

--- Post updated at 11:35 ---

maybe so
grep '^outbox\/logs\/' temp.txt | sort -t_ -nk2,2.4 | tail -1
or
grep '^outbox\/logs\/'...
1,550
Posted By RudiC
With that bash version, providing "process...
With that bash version, providing "process substitution", this might work for you:


exec > >(tee ZZ > XX) 2> >(tee ZZZ > XXX)
14,055
Posted By RudiC
Is it the single quote, be it escaped or not? Or...
Is it the single quote, be it escaped or not? Or another character? Or doesn't your shell like that special parameter expansion at all? Without further evidence, I'm afraid your external help will...
14,055
Posted By RudiC
It works fine with my bash. You have to...
It works fine with my bash. You have to experiment with your ksh. Double check with your man ksh on "Parameter Expansion". It may not accept the escaped single quote - test with leaving that out, and...
14,055
Posted By RudiC
How do these two statements fit together? ...
How do these two statements fit together?



What do you mean?
14,055
Posted By Don Cragun
You should know by now that you need to tell us...
You should know by now that you need to tell us what operating system and shell you're using. So, what shell are you using?

Do you have access to a 1993 or later Korn shell? If so, what output...
14,055
Posted By RudiC
How about while IFS=", " read PW WK FY; do...
How about
while IFS=", " read PW WK FY; do WK=$(( ${WK##*[a-z]}%53 + 1 )); printf "$PW, 'wk%02d $FY\n" $WK; done < file
curwk_d, 'wk05 fy18';
pw1_d, 'wk04 fy18';
pw2_d, 'wk03 fy18';
pw3_d,...
14,055
Posted By Don Cragun
Note that if this customer always has a fiscal...
Note that if this customer always has a fiscal week #53, there must be some years that don't have a fiscal week #1.

I have never seen a fiscal calendar like this used under any circumstances. ...
1,510
Posted By Don Cragun
I would tend to leave the code in the file where...
I would tend to leave the code in the file where it will be executed, but have it commented out on the days when it shouldn't run...

/*Start Sunday Only*/
execute calculation ...
1,510
Posted By Don Cragun
Can the Essbase application read AC.mxl (or...
Can the Essbase application read AC.mxl (or should that be AC.xml) from standard input or does it have to be given the pathname of the file containing the script as an operand?

Does the scripting...
1,510
Posted By Don Cragun
So, if your file isn't a shell script, what is...
So, if your file isn't a shell script, what is used to interpret your file?
1,261
Posted By Scott
It's a bit unclear. You want to load _env.ksh...
It's a bit unclear. You want to load _env.ksh into your current script?

If so, you need to source it in your script.


source ./_env.ksh
# or
. ./_env.ksh

If not, there could be a few...
1,261
Posted By Scott
You'd probably want to get rid of those ^Ms to...
You'd probably want to get rid of those ^Ms to start with.


dos2unix # if it's installed
# or
tr -d "^M" < file > newfile # ^M = Control-V followed by Control-M
1,370
Posted By Don Cragun
See if this alternative makes sense to you: ...
See if this alternative makes sense to you:
CheckSessions() {
for run in {1..5}
do
[ $run -gt 1 ] && sleep 5

[ -e "$_MAXLLOGFILE" ] && rm "$_MAXLLOGFILE"

....
7,070
Posted By Don Cragun
Sleep. What's that? ;) The way that...
Sleep. What's that? ;)

The way that _env.sh calculates _QUARTER only works if the quarter you are interested in is based on the calendar month in which you run your script. I thought the...
7,070
Posted By Don Cragun
Hi SIMMS7400, I'm still playing with it in the...
Hi SIMMS7400,
I'm still playing with it in the background... running into problems with more undefined variables and it appears that your script depends on being run from a certain directory which...
7,070
Posted By Don Cragun
OK. Thanks for running the test. It looks like...
OK. Thanks for running the test. It looks like quoting is a lot simpler and saner than you had indicated before.
7,070
Posted By Don Cragun
Please show us the actual contents of one of the...
Please show us the actual contents of one of the actual files that you have shipped to one of your customers (preferably for the data you would have gotten by running your script on Saturday, May 28,...
7,070
Posted By Don Cragun
So, the question boils down to what operating...
So, the question boils down to what operating system are you running? (If Linux or you have access to the GNU date utility, you can use what Scrutinizer suggested. If not, do you have access to a...
953
Posted By RudiC
What's so silly about the message cited? It's NOT...
What's so silly about the message cited? It's NOT an error, it's for your safety when restoring so files will not be overwritten, but there's other means to achieve this, e.g. ..skip-old-files. Or:
...
953
Posted By rbatte1
Is this just a case of appending *.txt to the...
Is this just a case of appending *.txt to the long pathname you already have, or have i missed the point?
tar -zcvf ${_ESSB_TAR_PATH}/Essbase_Exports_${_DATETIMESTAMP}.tar.gz -C /...
1,986
Posted By RudiC
@wbport: Yes, but this has not been requested;...
@wbport: Yes, but this has not been requested; look at the sample input data in post#1:
"Test","Test1" to be altered to '"Test","Test1"'
1,986
Posted By RavinderSingh13
Hello SIMMS7400, Could you please try...
Hello SIMMS7400,

Could you please try following and let me know if this helps you.

awk -vs1="'" '{match($0,/".*"/);sub(substr($0,RSTART,RLENGTH),s1 substr($0,RSTART,RLENGTH) s1);print}' ...
1,283
Posted By Don Cragun
Making a few wild guesses at what you're trying...
Making a few wild guesses at what you're trying to do, what operating system you're using, and hoping that you're using a shell that conforms to basic POSIX standard requirements, you might want to...
1,721
Posted By RudiC
Every command will (re)set the shell's $?...
Every command will (re)set the shell's $? parameter, so it can be meaningfully used to evaluate a certain command's success exactly ONCE. To evaluate it several times, assign it to a variable...
Showing results 1 to 25 of 37

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