Search Results

Search: Posts Made By: crazy_max
6,395
Posted By crazy_max
Concat strings without spaces...
Hello,

I have a very travial question....when i run the below script...how can i change my script that will give me an output pf "this is log_vp1" ....i dont want any spaces between log_vp and 1...
1,308
Posted By crazy_max
Thank you, that is what i was thinking too after...
Thank you, that is what i was thinking too after i posted...
1,308
Posted By crazy_max
Add line number to for loop?
> cat test.sh
for t in `cat out.txt`
do
echo create directory data as "'"$t"';"
done
>


output of out.txt is as below
/oracle/SID/data1/file2_1/
/oracle/SID/data1/file1_1/...
3,586
Posted By crazy_max
awesome that seem to work but how do i get it...
awesome that seem to work but how do i get it down to a specfic user/output...
3,586
Posted By crazy_max
Lol no this is not home work... we are being...
Lol no this is not home work...

we are being provided with dump file likes this by the DBA's from a different company and i been asked to come up with a way to minuplate this dump file to spit...
3,586
Posted By crazy_max
Sum value using sed or awk ?
Hello all,

how would one go about writing a command using sed/awk that will give me an output that can sum up the number of time each user has done something and also add the amount of time...
...
1,787
Posted By crazy_max
the below seem to work...could you please explain...
the below seem to work...could you please explain what you are doing ?

ls -tr file* |
while read f
do
sed -i -n '\m^ *[0-9]\{1,2\}/[0-9]\{1,2\}/[0-9]\{4\}m,$ p' "$f"
done
1,787
Posted By crazy_max
okay that worked, sorry i was looking at wrong...
okay that worked, sorry i was looking at wrong file i guess. didnt realized that it created a new file....

is there a way to do the same without creating a new file ?...just use the same file and...
1,787
Posted By crazy_max
that does not seem to work either ...
that does not seem to work either


[root@server user]# cat file1.txt
File-name---JUNK
headers
8/4/2013, 10/12/2014
data line 2
data line 3
data line 4
data line 5
[root@server user]# for...
1,787
Posted By crazy_max
i get below error when i use the above... ...
i get below error when i use the above...

[root@server1 user]# for f in file* ; do awk '/headers/{p=1;next}p' $f > $f_new; done
-bash: $f_new: ambiguous redirect
-bash: $f_new: ambiguous...
1,787
Posted By crazy_max
For loop to get rid of first 2 lines(conditionally)
hello all,

I get data from different vendors and need to clean it up. Usually it pretty straight forward when i have files that only have headers....but in my case i have files that have a...
1,228
Posted By crazy_max
Hvm or pvm
Hello all,

i am running a guest OS(RHEL 6.5) on vmware, i wanted to find out if there is anyway directly from RHEL OS to find out if my VM is HVM or PVM ?

or can that only be done at vmware...
10,938
Posted By crazy_max
Is there a way to do the same thing without the...
Is there a way to do the same thing without the KILL command?

as i do not have access to that....would something like below work??
df /oracle/stage >/dev/null 2>&1 </dev/null &
sleep 5...
10,938
Posted By crazy_max
any specific reason why touch is better than ls ?...
any specific reason why touch is better than ls ? in this case
10,938
Posted By crazy_max
clients are hp-ux and linux and same goes for...
clients are hp-ux and linux and same goes for server too(some NFS server are on HP-UX and some one linux)....

so thats why i need a script that work on both linux and HP-UX....
10,938
Posted By crazy_max
Hang NFS shell script check
Hello all,

i wrote a shell script that was running perfectly fine until we had some issue with our NFS server and the script was hung.
This script runs every 20 mins and obviously as we had the...
2,554
Posted By crazy_max
what exactly dose the below do? trap "rm...
what exactly dose the below do?
trap "rm db_list$$" EXIT
2,554
Posted By crazy_max
sorry that was bad on my part, i had copied part...
sorry that was bad on my part, i had copied part of my script from somewere else...but the below worked and you were absoletly right...it is 88

host:$ what /usr/bin/ksh|grep Version ...
2,554
Posted By crazy_max
Thanks don, i am not able to get the version, it...
Thanks don, i am not able to get the version, it just gives me the prompt back...

host:$ which ksh
/usr/bin/ksh
host:$ /usr/bin/ksh --version
$
$ /usr/bin/ksh --version
$

---------- Post...
2,554
Posted By crazy_max
this would run on different version of...
this would run on different version of HP-UX...mostly pa-risc 11.11 and itanium 11.31

---------- Post updated at 04:56 PM ---------- Previous update was at 04:52 PM ----------

thanks for the...
2,554
Posted By crazy_max
Read input and match string
#!/bin/ksh

echo DB LIST
ps -ef | grep pmon | grep -v grep | awk -F_ '{print $3}' | sort
db_up=`ps -ef | grep pmon | grep -v grep | awk -F_ '{print $3}' | sort`
echo

echo "Enter database name...
2,878
Posted By crazy_max
Thanks Don, i am not able to understand what...
Thanks Don, i am not able to understand what exactly do you mean when you say i can make the name of my successful backup log file be an operand to my shell script? Do you have an example of it for...
2,878
Posted By crazy_max
Thanks Don. I was trying for something too,...
Thanks Don.

I was trying for something too, but it did not work out...i did what you mentioned created touch entry for keeping track of successful DB(/tmp/checkifdbbackwassuccesful. and was...
2,878
Posted By crazy_max
That would be awesome, i am going to try what you...
That would be awesome, i am going to try what you said as well and see what i come up with...
2,878
Posted By crazy_max
Any ideas or thought on how i can achive this ?
Any ideas or thought on how i can achive this ?
Showing results 1 to 25 of 27

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