First  |  Prev |  Next  |  Last
Pages: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
bash: best way to do tenary operator??
Hi, folks: In most programming language, we can have a tenary operator like: A = ( condition ) ? A1 : A2; How can I do this nicely in bash. Currently I am using: if [ condition ]; then A=A1 else A=A2 fi which looks baggy, any better ways to handle this, many thanks.. ... 18 Apr 2008 20:37
Wget
In my address of a link it contains %20 If there is a % symbol then it will show an error in downloading the page How to tackle with this Santhosh ... 18 Apr 2008 10:14
let built-in doesn't work as expected
Hi, I have a file (myfile) containing the following lines: a = 1 b = 2 c = 3 now if I do: cat myfile | while read LINE; do let "$LINE" done AFAIK, I should get the environment variables a, b and c set to the values, but these variables don't get assigned at all. Could somebody please tell me wh... 18 Apr 2008 02:03
let built-in doesn't work as expected
Hi, I have a file (myfile) containing the following lines: a = 1 b = 2 c = 3 now if I do: cat myfile | while read LINE; do let "$LINE" done AFAIK, I should get the environment variables a, b and c, but it these variables don't get assigned at all. Could somebody please tell me why this is happe... 18 Apr 2008 18:14
Can I pass the output of some command to two or more commandswithout using a temporay file?
On Thu, 17 Apr 2008 20:45:30 -0700, PRC wrote: Hi All, Is there a easy way in bash to pass the output of running CMD1 to 2 or more commands CMD2, CMD3, ... etc, without saving the output of CMD1 to a temporary file? It is no good saving the output in a varible since bash converts the tailing '\r's t... 18 Apr 2008 01:15
Can I pass the output of some command to two or more commands without using a temporay file?
Hi All, Is there a easy way in bash to pass the output of running CMD1 to 2 or more commands CMD2, CMD3, ... etc, without saving the output of CMD1 to a temporary file? It is no good saving the output in a varible since bash converts the tailing '\r's to spaces. The tranditional way looks like: CMD1>tmpfile CMD... 18 Apr 2008 04:26
Spaces in Csh Paths
Is it possible to safely maintain directory names with spaces in a csh path? This works; set path = ( /bin /home/space\ bin ) However if a later script tries to add to it; set path = ( $path /usr/bin ) then the real escaped space is lost, since the set command expands the $path variable (which is an ... 20 Apr 2008 10:00
Help required:Awk Error
I am getting the following error while executing this awk script. The $TMP_FILENAME has a valid string echo $TMP_FILENAME; awk ' BEGIN {while ((getline < file_name) > 0) terminal_arra y[$0] = 1 ;print $0}' file_name=$TMP_FILENAME /tmp/sshterminals awk: cmd. line:1: fatal: expression for `<' redirection has ... 18 Apr 2008 12:38
selectively add the end of the line
Im sure this one is very easy but I can get want Im after. I have a spice file that looks like this: ..subckt CKNXLVTD3 A ZN M_u2 ZN A VSS VSS nch_lvt w=2.88u l=0.13u M_u1 ZN A VDD VDD pch_lvt w=7.62u l=0.13u D60 VSS A ndio_lvt AREA=1.65e-13 PJ=1.7e-06 ..ends and it needs to look like this: ..subckt CKN... 21 Apr 2008 04:18
Replace symbols > and < with &lt; and &gt;
Is there a method to replace the greater than and less than symbols with &lt; and &gt; for processing in an XML file? I had tried to use sed similar to the following but it does not work: $ echo "test>1w3" |sed 's/>/&gt;/g' test>gt;1w3 ... 17 Apr 2008 02:48
First  |  Prev |  Next  |  Last
Pages: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31