Search Results

Search: Posts Made By: KD_999
Forum: HP-UX 10-20-2012
17,685
Posted By jim mcnamara
I assume you mean: use date command with another...
I assume you mean: use date command with another format --


date "+%Y-%m-%d %H:%M:%S"


The date format string starts with the + character, it does not show up in the output.
If you forget it...
58,991
Posted By Neo
I should probably start using Python for routine...
I should probably start using Python for routine tasks more .... it time I got off my dependance on PHP in the shell and start doing more in Python, me thinks.

Thanks Andrew.
7,305
Posted By RudiC
How about awk '/^>/ {$0 = $0 "" ++SUFF[$0]} 1'...
How about
awk '/^>/ {$0 = $0 "" ++SUFF[$0]} 1' file
8,368
Posted By Yoda
Here is an approach using nawk by checking each...
Here is an approach using nawk by checking each character:-
nawk '
{
for ( i = 1; i <= length; i++ )
{
c = substr($0,i,1)

...
8,368
Posted By RudiC
Why switch between perl and awk? Stick to one: ...
Why switch between perl and awk? Stick to one:
awk -F"[()]" '{for (i=2; i<=NF; i+=2) printf "%s ", $i; printf RS}' file
BOS.FOS.T.CDG.MEDGTOC.01 CLENTT1 NOTFIXED YES Cargo dangerous goods queue...
Forum: HP-UX 10-01-2019
8,624
Posted By MadeInGermany
IMHO cron merges stdout and stderr by default. ...
IMHO cron merges stdout and stderr by default.
So there is no need for exec 2>&1.
11,389
Posted By cmccabe
set x showed the same as the previous post, I...
set x showed the same as the previous post, I initially thought there may be multiple files so used a for, but quickly realized that wasn't going to work. Is there a better approach? Thank you :).
...
11,389
Posted By MadeInGermany
The syntax requires then between if and else. ...
The syntax requires then between if and else.
And what does the for loop with STRING?
You probably want
## added newline boundry seperator
nl="
"
for f in "$DIR"/f1
do
STRING=$(awk -v...
11,389
Posted By MadeInGermany
A few suggestions: for RDIR in "$DIR"/R_2019* ;...
A few suggestions:
for RDIR in "$DIR"/R_2019* ; do ## # matching "R_2019*" to operate on desired directory and expand
test -d "$RDIR" || continue ## is a directory, or jump to the next cycle...
Forum: HP-UX 03-05-2018
8,950
Posted By RudiC
Two generic (non- HP-UX- specific) comments: -...
Two generic (non- HP-UX- specific) comments:
- why the -exec ls -l action for find? You want file names, not a "long listing". Try dropping entirely.
- Does emoaigin have write access to /root -...
Forum: HP-UX 02-28-2018
8,950
Posted By gull04
Hi, When I'm doing this I tend just to do...
Hi,

When I'm doing this I tend just to do the whole thing in a single line - something like.

#> tar cf - | ssh me@server ( cd /destination ; tar xf - )

Obviously you would adjust the create...
8,130
Posted By DougyC
Hi, Found the issue. I modified...
Hi,

Found the issue.

I modified sshd_config on the destination with the following param and restarted sshd:
MaxStartups 50:30:100

It wasn't set, so the default was 10 max before it started...
1,336
Posted By newbie_01
Any way to sort ps output based on STIME?
Hi,

This is one of the thing that am looking for when I post the question on the ps wrapper. It has since been closed as it has taken me too long to post an example.

I have replaced some of the...
57,704
Posted By psysc0rpi0n
Thank you for replying... Well, in fact it...
Thank you for replying...

Well, in fact it looks alot like that. However I can assure it's not an homework. I have already graduated earlier this year in February. And I'm not someone that just...
57,704
Posted By Neo
Yes, you can do this in bash, but most people...
Yes, you can do this in bash, but most people working with JSON are serializing data to be displayed on the web and so, they generally do not program web-based applications using bash.

What I...
11,389
Posted By Chubler_XL
You have a done statement on line 11 that doesn't...
You have a done statement on line 11 that doesn't match to anything.

S5=$(cut -d/ -f6 <<<"$TRIMSTR") ## store run with no path as S5
S5 will be empty because TRIMSTR doesn't contain 6 entries.
...
7,275
Posted By Master_Mind
Will this work code=$1 if [ $counter...
Will this work


code=$1
if [ $counter -eq 3 ];then
[[ "${code}" = 'JP' ]] && nohup sh script.sh $val 1 &
fi
7,275
Posted By Chubler_XL
Is this what you are after? [[ "${counter}"...
Is this what you are after?

[[ "${counter}" -eq 3 && "${code}" = 'JP' ]] && nohup sh script.sh $val 1 &
7,151
Posted By Peasant
Complement the code with : ...
Complement the code with :

INPUTDIR=/path/with/files
for i in $INPUTDIR/abc*.dat
do
if [ -f $i ]; then
echo "File exist, processing..."
else
...
7,151
Posted By Rajesh123
If at least one file does not exists then script...
If at least one file does not exists then script should throw error and execution should stop.

array=($inputdir/abc*.dat)
If [ [ -f ${array[0] ] ]
then
EXITCD=44
else
echo " file does not...
Forum: AIX 08-18-2019
16,775
Posted By Neo
You need to look at the host controller, host...
You need to look at the host controller, host adapter, or host bus adapter (HBA) and HD support (kernel) before looking at disks, in my view. First, get an understanding of your system hardware /...
Showing results 1 to 21 of 21

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