Search Results

Search: Posts Made By: islegmar
13,802
Posted By islegmar
Awesome! :-) Let's suppose I'm not inside a...
Awesome! :-)

Let's suppose I'm not inside a script, I am in a shell (so, I don't want to execute exit), how can I undo the redirect? Somehing like "exec 1>/dev/tty[n]"? How can I see where is...
13,802
Posted By islegmar
Redirect stdout/stderr to a file globally
Hi

I am not if this is possible: is it possible in bach (or another shell) to redirect GLOBALLY the stdout/stderr channels to a file.

So, if I have a script

script.sh
cmd1
cmd2
...
7,477
Posted By islegmar
กก THANKS A LOT!! :-) It works fine, I...
กก THANKS A LOT!! :-)

It works fine, I didn't know I could execute directly the UNIX commando without system.

Thanks again for all yout help!!!

Isi
7,477
Posted By islegmar
Hi %% is used for escaping the special...
Hi

%% is used for escaping the special character %, so %%s wouldn't expect any command ant it will print the % character.


sprintf("date -d %s +%%s",d1)

will print

date -d <value for...
7,477
Posted By islegmar
Hi Thanks for the reply but I get an error...
Hi

Thanks for the reply but I get an error when using getline. Is getline an standard UNIX command (I'm using cygwin :-()? Can I use it inside an awk code?

My code is


awk -v inicio=$f1 -v...
7,477
Posted By islegmar
Hi, I have the same problem and I the...
Hi,

I have the same problem and I the solutions posted here don't work for me or I don't understand them :-( So, how can I retrive in awk the returned value by a shell command and not its return...
2,042
Posted By islegmar
Print portion line in SED
Hi,

This is more a theoretical question, because I usually solved that with perl or even java, but I would like to know if it exists an easy way to do it with SED.

Using regular expresions it's...
1,955
Posted By islegmar
Original text AAAA [one|1] BBBB | CCCCC...
Original text

AAAA [one|1] BBBB | CCCCC [two|2] DDDDD

desired result

AAAA [one>1] BBBB | CCCCC [two>2] DDDDD

only the | between [] are changed. I know how to perform the chage (see my...
1,955
Posted By islegmar
Can sed perform editing operations ONLY in the matched region?
Hi:

Let's suppose I want to replace all the | by > ONLY when | is between []. Usually (and it works) I would do something like

sed -e 's/\(\[[^|]*\)|\([^[]*\]\)/\1>\2/g'

where I have to...
20,561
Posted By islegmar
Which is the STRING format in the date command?
Hi

According with the 'date' command documentation


My question is, which are the possible values for STRING? I have been looking in the man pages but I didn't find anything?

After some...
Showing results 1 to 10 of 10

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