I am just wondering is this (below code) valid in programming
I compiled this using gcc will all working option successfully without getting any warning or error. I didn't see this kind of code in my past experience. Please comment the cons if any
Thanks and Regards...
Last edited by Franklin52; 04-05-2011 at 07:33 AM..
Reason: Fixed code tags
I am trying to assign a awk array for further processing later in the script. I can't seem to figure it out. If someone could look at this and help me, I would very much appreciate it.
Thanks in Advance.
for ( x = 1 ; x <= Var ; x++ ) {
if ( x in varr ) {
... (2 Replies)
Running: GNU/Linux, 2.6.22.9-61.fc6 (hope that's the right info needed)
I am trying give the amount of RAM and the % used. I am using free command.
I am having some problems with this command
code:
1)T = `free | grep Mem | awk '{print $2}'`
F = `free | grep Mem | awk '{print $4}'`... (3 Replies)
I have a string as "yes why not"
I want to create one array variable with contents as one word per place in array..
for above string,the array variable should contain...
x="yes,why,not"
x = yes
x = why
x = not
Please help me,I am stuck up in the problem since 2 days... (3 Replies)
I want to ask the user to enter an X amount of file names. I want to put those names into an array and then loop back through them to verify they are in the directory. 1st- How would I assign the value to an array and what is the correct syntax. 2nd- how would i reference that array after I... (3 Replies)
Hi Experts,
I'm having issue in assigning var with special character , please see below for complete details.
$ echo $SHELL
/bin/csh
$ cat bp
abd/asd/a
$ awk -F "/" '{print $NF}' bp | awk '{print $1}'
a
$ set a=`awk -F "/" '{print $NF}' bp | awk '{print $1}'`
$ echo $a ... (15 Replies)
Hi,
I have a piece of code as follows:
i=0
while read LINE
do
var = "$LINE"
i=$((i+1))
echo "${var}"
done < file
I want to assign value to the array var.
However, when i execute the script i get a error.
Please can you help me know what i am missing.
I ultimately want to... (2 Replies)
Hi all ,
I have a string like para1#para2#para3
i want to assign para1 as first element para2 as second and so on
i tried
IFS=#
set -A array para1#para2#para3
echo ${array}
para1 para2 para3
i want echo ${array}
para1 (2 Replies)
Hello All,
Can you please help me with the below.
#!/bin/bash
ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5 EXTRACT_DT:30-SEP-12 VER_NUM:1"
ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5... (14 Replies)
Hi,
I have a 10*10 two dimensional array. How do I assign value to all it's 100 elements at once? I don't want to open two for loops and assign one by one.
Thanks,
Amit (2 Replies)