Search Results

Search: Posts Made By: rbatte1
341
Posted By rbatte1
Hello mrAibo, You might get some joy from...
Hello mrAibo,

You might get some joy from the output of the stat command. The file is Modified as it is created and Changed as the content is written, however this might not be safe for a polling...
Forum: Shell Programming and Scripting 2 Weeks Ago
456
Posted By rbatte1
I defer to your superior offering (and I will...
I defer to your superior offering (and I will steal it if I ever have a similar need ;))



Kindest regards,
Robin
Forum: Shell Programming and Scripting 2 Weeks Ago
456
Posted By rbatte1
One line sed option
How about using a single line sed like this:-sed "s/^C\( CALL.*'\(Gmax\|Gmin\|HS10\|HS2\|HS9\|Hmax\)'.*\)/\1/" source_file_name > target_file_name

It's a little messy to read, so:-

The s...
375
Posted By rbatte1
What do these give you?grep -n '' file1 | head ...
What do these give you?grep -n '' file1 | head
grep -n '' file2 | headI agree that this is most likely peculiar characters in the data. To see if we can spot something, can you:head file1 | od -tx...
692
Posted By rbatte1
I would think that you are spending a lot of time...
I would think that you are spending a lot of time in your loop repeatedly opening the database connection. Could you build all the queries into a single command file and execute one DB read? The...
427
Posted By rbatte1
This is telling you that the value for pday is...
This is telling you that the value for pday is not set or not an integer, so your command as a whole becomes invalid. Could you sh -xv rmAgingFile.sh file*.log 2 and review the output to see what is...
Forum: AIX 2 Weeks Ago
932
Posted By rbatte1
It depends quite what you are looking for. Do...
It depends quite what you are looking for. Do any of these help (sorry but I no longer have access to AIX so I'm a bit rusty!)lspv
lspv -v
lspv -l
lsvpcfg # (possibly with a -l...
561
Posted By rbatte1
I'd be very worried by this approach. You are...
I'd be very worried by this approach. You are inviting someone to put something dangerous in a file and mentioning that as a parameter and then you will call/run that unrestricted code to control...
425
Posted By rbatte1
Have you added this account to /etc/ftpusers by...
Have you added this account to /etc/ftpusers by any chance? Confusingly that is a list of users NOT permitted to login with ftp.

Another thought is that the account might be locked. Do you get...
Forum: Shell Programming and Scripting 3 Weeks Ago
595
Posted By rbatte1
Would changing echo to printf work?printf "$str1"...
Would changing echo to printf work?printf "$str1" > text.txt



Robin
1,057
Posted By rbatte1
Yes, the value of outvar will just hold all the...
Yes, the value of outvar will just hold all the content of your file. You might prefer to process the variable or create another by reading the file in a different way. It's up to you, but you can...
842
Posted By rbatte1
I must admit, I like jim mcnamara's neat...
I must admit, I like jim mcnamara's neat response. It made me wonder about the string often all of the kinds of Norway as an example where the string might exist embedded in another word. Is this a...
1,057
Posted By rbatte1
I'm gald this got you moving again. You should...
I'm gald this got you moving again. You should really test this hard too and work out how to handle errors in creating the file that might mean you:-
have multiple lines
have multiple values on...
648
Posted By rbatte1
Okay, I'm sure we can help with that. A few...
Okay, I'm sure we can help with that. A few questions for clarity though:-
Must the filename in the fastconcatg directory be the prefix of the directory that the source was found in?
What do we...
648
Posted By rbatte1
Hello dineshkumarsrk, A few general comments...
Hello dineshkumarsrk,

A few general comments first:-

Your for loop has an extra * which might be confusing when you read this later on.
It would be better to use longer variable names to...
1,057
Posted By rbatte1
The outvar=`cat test.out` is not great from a few...
The outvar=`cat test.out` is not great from a few things:-

The backticks ` are deprecated and can make complex statements difficult to read. You would be better to wrap such code with $( and )
...
651
Posted By rbatte1
Rather than the effort and cost of a second...
Rather than the effort and cost of a second array, could you create a flag that is either zero or one. You then have a simple test to add to your code:-
If the flag is zero, display the output and...
1,057
Posted By rbatte1
Your exit &v_count statement needs to at least be...
Your exit &v_count statement needs to at least be run before the EOF closes the here document else this is left to the shell. It will run the shell exit in the background and then try to run the...
863
Posted By rbatte1
Why single quotes anyway? They stop...
Why single quotes anyway? They stop interpretation of the string quoted. If you want to pass something that changes, how about one of these:-ssh $i "systemctl is-enabled ${j}"; # No...
1,057
Posted By rbatte1
Hello senmng, Your first active line calls...
Hello senmng,
Your first active line calls another script. Is that meant to load functions in for you? I'd suggest preceding it with the word source else any variables set and the functions...
828
Posted By rbatte1
How about:-output_width=30 #...
How about:-output_width=30 # Adjust this to get sensible output
while read value
do
printf "%${output_width}s\n" "${value}"
done < input_file | sort -nk 1.$[output_width-1] ...
1,057
Posted By rbatte1
Please can you post the code you ran to generate...
Please can you post the code you ran to generate the error. It might be that the comments get in the way, so perhaps strip them out and try again too.

An alternate might be to return a complex...
116
Posted By rbatte1
You should be aware of several things that can...
You should be aware of several things that can catch you:-
Using egrep is the same as grep -E so the string passed is an Extended Regular Expression. Along with | as an 'or' separator, it also...
Forum: AIX 12-20-2019
1,444
Posted By rbatte1
Could this be that whatever is supplying the...
Could this be that whatever is supplying the common disk used to keep heartbeat failed? That way, both nodes would be unable to keep updating the shared disk and the usual response is to terminate...
813
Posted By rbatte1
You might discover that sizes considered by find...
You might discover that sizes considered by find are based on blocks and might not exactly match what you want.

If this is the case and you need it to be perfect, consider running find to get all...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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