Search Results

Search: Posts Made By: dunkar70
Forum: AIX 05-23-2012
5,567
Posted By dunkar70
I cannot speak to AIX; however, WinSCP is a...
I cannot speak to AIX; however, WinSCP is a client tool I have used to access Solaris and Linux systems. You can have users enable activity logging in WinSCP, but you cannot enforce it without...
10,954
Posted By dunkar70
What work have you started on this script? This...
What work have you started on this script? This forum is intended to help you resolve issues in your solutions, not necessarily as a consultancy to do the work for you. This is not to say you won't...
14,178
Posted By dunkar70
I provided the link to help you do your own...
I provided the link to help you do your own research. You really should do some research before asking your questions.

If you had read the post, you would have found:perl -e "print time();"It...
14,178
Posted By dunkar70
Check this post... ...
Check this post...

https://www.unix.com/aix/40224-get-unix-timestamp.html
27,219
Posted By dunkar70
If you are talking about transmitting files, use...
If you are talking about transmitting files, use scp. scp is the SSH version of ftp or copy. You can learn more about scp by typing: man scpIf you are talking about executing a set of commands on the...
6,426
Posted By dunkar70
Can you provide a sample of the file? What is the...
Can you provide a sample of the file? What is the format of each line and the date stamp.

Does the data already exist or are you also trying to define the data format?
Forum: Infrastructure Monitoring 05-11-2010
9,908
Posted By dunkar70
You can also keep the historical data manageable...
You can also keep the historical data manageable by tailing the file. Log all values into a single file, such as history.log
At the beginning of the log file processing, execute: tail history.log >...
37,223
Posted By dunkar70
Try this... #!/bin/bash input=( $* ) for...
Try this...

#!/bin/bash
input=( $* )
for w in ${input[@]}; do
if [ ! ${w//[0-9]*/} ]; then
echo $w
fi
done
37,223
Posted By dunkar70
try: #!/bin/bash input=$1 echo ${input} ...
try:

#!/bin/bash
input=$1
echo ${input} # echos the full input
echo ${input//[0-9]/} # echos the digits found within the input

This assumes all digits are...
4,577
Posted By dunkar70
Try this... #!/bin/bash today=`date...
Try this...

#!/bin/bash
today=`date +%Y_%m_%d`
if [ ! -d /TS_File/${today} ]; then
mkdir /TS_File/${today}
fi
2,341
Posted By dunkar70
The responses provided by sunpraveen and saxxon...
The responses provided by sunpraveen and saxxon will work; however, the results will only appear on the standard output, which is generally the screen. If you want to store the changes in the...
Forum: AIX 05-10-2010
4,404
Posted By dunkar70
If you are using tar to create your backup, the...
If you are using tar to create your backup, the answer varies. The GNU version of tar has an option (-z) that allows you to create compressed tarballs in one action. The Solaris version does not...
3,997
Posted By dunkar70
You do not need to enclose the ls command in a...
You do not need to enclose the ls command in a separate script file. Try this...ssh user@b 'ls -la > output.txt'
where user is the id on the destination system (b) under which you want to connect...
5,163
Posted By dunkar70
If your replacement text contains the same...
If your replacement text contains the same character you are using as a delimiter, you need to escape it. In the example you provided, you included a closing DIV element, i.e. </div>. Try using...
2,054
Posted By dunkar70
The answer is B. The question starts with...
The answer is B.

The question starts with the premise of passing a parameter to a script call and assigning the parameter to the variable X. Consider a sample script called test.sh:
#!/bin/bash ...
14,073
Posted By dunkar70
The for loop, at least in BASH, is limited to...
The for loop, at least in BASH, is limited to situations like "for x in (list)" situations. Rather than having your (( a=0; a< blah; a++)), you need to replace it with something that will generate a...
1,402
Posted By dunkar70
This sounds like homework. If so, you should...
This sounds like homework. If so, you should following the directions and use the homework forum.

mkdir will create directories, not files in which you can add content. The "-p" option allows you...
5,450
Posted By dunkar70
@alister, thanks for clarifying. I guess I...
@alister, thanks for clarifying. I guess I generally use camelBack naming convention so I have not come across this before. I think I also assumed (I know, my bad) that the for loop would only use...
5,450
Posted By dunkar70
@alister, Understood. The statement I...
@alister, Understood.

The statement I provided should handle special characters in the find and for loop statements. How the files are processed after finding them is up to the code within the...
5,450
Posted By dunkar70
Alister is correct that command substitution is...
Alister is correct that command substitution is expensive in terms of processing resources, but using a simple *.txt will not find the files in sub-directories. See my previous post. Unless you are...
5,450
Posted By dunkar70
for f in $(find . -name "*.txt"); do echo...
for f in $(find . -name "*.txt"); do
echo Do something with ${f}.
done
7,262
Posted By dunkar70
processFile "${d}/${f}" is simply a function call...
processFile "${d}/${f}" is simply a function call while passing a single parameter. As the two nested loops (for d and for f) cycle through, the function is called multiple times with different...
2,725
Posted By dunkar70
try this... for x in $*; do echo $x; done
try this...

for x in $*; do echo $x; done
7,262
Posted By dunkar70
I suggest adding a new for loop inside the...
I suggest adding a new for loop inside the existing for loop. The new loop structure will loop through the directories and for each directory it will loop through the file list.

I would avoid hard...
7,262
Posted By dunkar70
Right now, you have the output redirected into...
Right now, you have the output redirected into the output file twice.

You need to use either "| tee -a ${LOGFILE}" or ">> ${LOGFILE}" at the end of the echo commands.
Showing results 1 to 25 of 55

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