Search Results

Search: Posts Made By: canduc17
2,759
Posted By canduc17
Mount twice sshfs dir
Hi everyone.

I have 3 machines, let's call them store, node1 and node2.
I have to mount on node1 and node2 the same directory of store.
So, I launch the sshfs command on node1 and everything...
1,621
Posted By canduc17
sshfs twice on the same dir
Hi everyone.

I have 3 machines, let's call them store, node1 and node2.
I have to mount on node1 and node2 the same directory of store.
So, I launch the sshfs command on node1 and everything...
40,203
Posted By canduc17
user@localhost ~ $ strings binaryFile | grep -Eo...
user@localhost ~ $ strings binaryFile | grep -Eo '[0-9][0-9][A-Z][a-z][a-z][0-9][0-9]'
09Sep09
user@localhost ~ $This is definitely the best one: simple, fast and elegant.

Thank you so much guys!
40,203
Posted By canduc17
@john1212user@localhost ~ $ cat binaryFile | sed...
@john1212user@localhost ~ $ cat binaryFile | sed -n 's/[0-9][0-9]Jan\|Feb\|Mar[0-9][0-9]/&/g/p'
sed: expression -e #1, char 40: `s' option unknown
user@localhost ~ $ strings binaryFile | sed -n...
40,203
Posted By canduc17
user@localhost ~ $ for I in Jan Feb Mar Apr May...
user@localhost ~ $ for I in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ; do strings binaryFile | sed -n "s/.*\([0-9][0-9]${I}[0-9][0-9]\).*/\1/p" ; done
09Sep09
user@localhost ~ $It works, but...
40,203
Posted By canduc17
user@localhost ~ $ cat binaryFile | sed -n...
user@localhost ~ $ cat binaryFile | sed -n 's/[0-9][0-9]Jan\|Feb\|Mar\|Apr\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\[0-9][0-9]/&/g'
user@localhost ~ $ strings binaryFile | sed -n...
40,203
Posted By canduc17
Excuse me, but I don't understand how to use your...
Excuse me, but I don't understand how to use your command.
I've tryedstrings binaryFile | sed -n 's/[0-9][0-9]Jan\|Feb\|Mar\|Apr\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\[0-9][0-9]/&/g'and several other...
40,203
Posted By canduc17
Yeah, great! I'm almost done. The...
Yeah, great!

I'm almost done.

The remaining problem is that this date is on the same line with a lot of other stuff and when I launch your command, the whole line is retrieved.
I obtain only...
40,203
Posted By canduc17
Grep on a binary file
Hi everyone.

I have a binary file in wich there is a date with format DDMMMYY, for example 02May09.

I can see it opening this file with vim: inside a binary mess, I can clearly read that...
10,812
Posted By canduc17
Ok, thank you for the explanation!
Ok, thank you for the explanation!
10,812
Posted By canduc17
Print user password
Hi everyone.
I have root acces to an Ubuntu machine.
This machine have several users so, being root, I can access to their account without knowing their password, simply usingsudo su userBut I need...
5,835
Posted By canduc17
@ scottn: The code I reported is a small piece...
@ scottn:
The code I reported is a small piece of a 400 lines bash script, dealing with geographic coordinates manipulation.

In the version not looped, I've something likeDEGREES=$( echo...
5,835
Posted By canduc17
Your example, scottn, works fine. But my real...
Your example, scottn, works fine.
But my real case is a little bit more complicated...here a portion of it:for I in UL_LAT UR_LAT LR_LAT LL_LAT UL_LON UR_LON LR_LON LL_LON ; do
#...
5,835
Posted By canduc17
Variable name change in a loop
I need to do something like this:for I in var1 var2 var3 ; do
$I = "Something calculated inside the loop"
doneObviously it doesn't work...but is it possible doing that in other ways?

Thanks in...
2,495
Posted By canduc17
Yes, as edited above now it works perfectly. ...
Yes, as edited above now it works perfectly.
Thanks!
2,495
Posted By canduc17
It should be exactly what I need, but...
It should be exactly what I need, but unfortunately it doesn't work:user@office-007 /media/LaCie $ find /media/LaCie/ -type f -name "M0D03.*"
user@office-007 /media/LaCie $And I'm shure that inside...
2,495
Posted By canduc17
Have absolute path for files in different dirs
Hi everybody.
I need a command to print the absolute path of files which name starts always with a pattern (MOD03), independently on where they are in the filesystem.
I have tryedls -ld...
9,166
Posted By canduc17
Thank you so much scottn! Now my script works...
Thank you so much scottn!
Now my script works as I wanted to and I have definetely better understood bash redirection.

I've reimplemented your last example in a way more similar to my case:...
9,166
Posted By canduc17
The closest solution I have tryed is the...
The closest solution I have tryed is the following:log() {
while read LINE; do
echo "$(date) - ${LINE}" >> "${LOGFILE_2}"
done
}

${command} >> "${LOGFILE_1}" 2>>"${LOGFILE_2}...
9,166
Posted By canduc17
I'm working on a Red Hat Enterprise 4 AS with GNU...
I'm working on a Red Hat Enterprise 4 AS with GNU bash, version 3.00.15(1)-release (i386-redhat-linux-gnu).

I tryed your script but I obtain either stdout and stderr in both log files...
9,166
Posted By canduc17
Thank you scottn and sorry for having bumped the...
Thank you scottn and sorry for having bumped the thread up.
I've tryed to adapt your script to my needs, without success.

I have:log() {
while read LINE; do
echo "$(date) - ${LINE}"...
9,166
Posted By canduc17
Excuse me, but I do not understand your...
Excuse me, but I do not understand your answer...No ideas for the stderr/log stuff?
9,166
Posted By canduc17
Ok, thanks, pretty simple... And is it...
Ok, thanks, pretty simple...

And is it possible to give the stderr as input to a fuction?

For example, I have this function:log() {
echo "$(date) - $1" >> "output.log"
}Is it possible to...
9,166
Posted By canduc17
Append stderr
Hi everybody.

I was used to redirect stderr to a file in this way, calling a generic script:./myScript &> output.logBut now I need something more sophisticated...Inside a bash script I launch an...
9,402
Posted By canduc17
The problem is that the file name changes every...
The problem is that the file name changes every time (it is an image to process) and I can't change its management (renaming it, etc...)

It just falls in this dir from another system and when it...
Showing results 1 to 25 of 30

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