Search Results

Search: Posts Made By: linuxpenguin
700
Posted By linuxpenguin
ok, I get it Here you go sort a.txt |...
ok, I get it
Here you go


sort a.txt | awk -F'=' 'BEGIN {l=null} $1 ~ /Time|Server|Run|Tables/ {if($1 != l ) {l=$1; printf("\n%s ",$1)} else { printf("%s ",$2)}}'
700
Posted By linuxpenguin
Sorry, I don't understand. Are you saying you...
Sorry, I don't understand. Are you saying you want it in that order?
Forum: Programming 03-28-2014
2,997
Posted By linuxpenguin
Cool, good luck. I believe when you kill the...
Cool, good luck. I believe when you kill the parent and run setsid, it will disassociate the terminal, thereby putting it in the background.
831
Posted By linuxpenguin
You can also try ioctl, which is lower level, and...
You can also try ioctl, which is lower level, and I think, gives more control.
700
Posted By linuxpenguin
Would this work sort a.txt | awk -F'='...
Would this work


sort a.txt | awk -F'=' 'BEGIN {l=null} {if($1 != l ) {l=$1; printf("\n%s ",$1)} else { printf("%s ",$2)}}'
3,673
Posted By linuxpenguin
You can try ssh -vvv to see if the output gives...
You can try ssh -vvv to see if the output gives some hint for the failures
8,314
Posted By linuxpenguin
I have not used expect so much, but may be you...
I have not used expect so much, but may be you can pass in the ls command in the ssh itself, like so


spawn ssh ..... "ls $filename"


I have come across similar situations before, but in my...
801
Posted By linuxpenguin
If you provide sample input and sample output it...
If you provide sample input and sample output it will be much more easy to understand.
For e.g. are the email and subject in each file, on the same line?

Does every email have a subject? so on....
Forum: Programming 03-27-2014
2,997
Posted By linuxpenguin
To answer 2, to put the process in background,...
To answer 2, to put the process in background, you will have to
1. fork from the parent.
2. terminate the parent so the child is owned by init.
3. and dissociate the tty by setting session...
696
Posted By linuxpenguin
For asynchronous sharing, shared memory is what I...
For asynchronous sharing, shared memory is what I would think of.

For synchronous processes you would have to use combination of shared memory and semaphores. I believe you would need it...
1,068
Posted By linuxpenguin
sed -ie "s/\(.*sreenivas.*\)/#\1/"...
sed -ie "s/\(.*sreenivas.*\)/#\1/" <filename>
804
Posted By linuxpenguin
How about just observing the /var/log/messages...
How about just observing the /var/log/messages file.
Depending on you *nix flavour this may be a different file. This file has entries like


Mar 27 17:04:30 <hostname> sshd[17857]:...
1,255
Posted By linuxpenguin
Ok, lemme see if I understand you correct. ...
Ok, lemme see if I understand you correct.


from_date=$1
to_date=`date +%H`

for i in `seq -w ${from_date} $t` ;do
echo $i;
## Put your copy logic here.
done
651
Posted By linuxpenguin
If I understand your problem statement correctly,...
If I understand your problem statement correctly, this should do what you want.


date=`awk 'NR>5; END{print}' /home/home03/date.dat`
source_dir="/home/home01"
target_dir="/home/home02"

##...
772
Posted By linuxpenguin
Look for man bash, and search PS1. It has a tonn...
Look for man bash, and search PS1. It has a tonn of option. But if you are lazy like me, here's the quick one


export PS1="[\u@\h \w]\$"


Should do what you want. Make sure after this is...
5,812
Posted By linuxpenguin
In most situations I have done as suggested...
In most situations I have done as suggested above.
Also after the sql statement I just check for $?
sqlplus does assign $? a 0 on success and non zero on failure( in most cases)
but other oracle...
3,757
Posted By linuxpenguin
oh my bad, while read line;do ...
oh my bad,


while read line;do
ts=`echo "$line"|cut -d',' -f1
rest=`echo "$line"|cut -d',' -f2-
d=`date --date="@${ts}" "+%d/%m%Y %H:%M:%S"`
echo "$d,$rest"
done < inputfile >...
3,757
Posted By linuxpenguin
do you see errors, or the output file is not what...
do you see errors, or the output file is not what you want?
2,193
Posted By linuxpenguin
What version of red hat? what shell Appears to...
What version of red hat? what shell
Appears to work fine in bash/zsh for me.

$ paste 1 2 3
123 234 456
345 789
678
3,757
Posted By linuxpenguin
try this while read line;do ts=`echo...
try this


while read line;do
ts=`echo "$line"|cut -f1
rest=`echo "$line"|cut -f2-
d=`date --date="@${ts}"
echo "$d,$rest"
done < inputfile > output file
1,700
Posted By linuxpenguin
I like to think this may be easier using xmllint...
I like to think this may be easier using xmllint (with --xpath)
3,757
Posted By linuxpenguin
Assuming your first column is the epoch time ...
Assuming your first column is the epoch time
you can do this (from man date)

date --date='@2147483647'
1,079
Posted By linuxpenguin
just to be a little more careful egrep -w -v...
just to be a little more careful

egrep -w -v "^3" <filename>

would be little more safer. I do see a space/tab in the above regex, but a -w will ensure you are deleting like that as your id as...
4,910
Posted By linuxpenguin
Why not just do cp -r source dest? ...
Why not just do cp -r source dest?

/tmp/cp_test >tree a
a
├── b
│** ├── x
│** │** └── t1
│** └── y
├── c
│** └── t2
└── d

5 directories, 2 files
/tmp/cp_test >tree a2
a2
└── b
...
3,575
Posted By linuxpenguin
Thanks for your reply, although it sounds like...
Thanks for your reply, although it sounds like you re-iterated the existing problems. I am wondering if there is a solution/work around/alternatives to notify-send. Can I use some dbus utility that...
Showing results 1 to 25 of 345

 

Featured Tech Videos

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