Search Results

Search: Posts Made By: linuxpenguin
3,274
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)}}'
3,274
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
6,275
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.
1,608
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.
3,274
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)}}'
7,889
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
13,487
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...
2,447
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
6,275
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...
1,529
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...
8,029
Posted By linuxpenguin
sed -ie "s/\(.*sreenivas.*\)/#\1/"...
sed -ie "s/\(.*sreenivas.*\)/#\1/" <filename>
2,676
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]:...
3,093
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
1,314
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"

##...
1,818
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...
10,264
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...
8,160
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 >...
8,160
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?
4,544
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
8,160
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
5,207
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)
8,160
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'
2,111
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...
8,741
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
...
5,128
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

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