use for loop construct, or while loop construct.. whichever you like.
Google -> using loops in shell script
Hope this helps
Best Regards,
Sumit.
User Profile
Collapse
Profile Sidebar
Collapse
sumittyagi
Last Activity: Jul 14 '12, 06:18 AM
Joined: Mar 5 '07
Location: New Delhi, India
-
Yes, arrays solved it out. it took 3 full iterations (if there are 100 elements then 3X100=300 iterations => two for assignment and one for display).
Any other improvement suggestion will be appreciated.Leave a comment:
-
I think arrays will solve my problem...
Any other suggestions?Leave a comment:
-
I am half way through:-
I tried to use join command, but it seems to compare in an ambiguous manner:-
Below is the sample output:-
file1 is:-
file2 is:-
join command gives output for one digit matches only for the key match column as shown below:-
...Code:join -j1 1 -j2 1 -o 0,1.2,2.2 -t " " file1 file2 1 51 2605 2 52 1486 3 53 2783
Leave a comment:
-
Joining(merging) two files.
Hi All,
I am stuck with one tricky situation here.
The situation is as follows:-
I have two files, both files have two columns - space seperated key value pairs.
Now say files are f1 and f2.
and columns in f1 are f1c1, f1c2; and columns in f2 are f2c1 and f2c2.
f2c1 is a subset of f1c1 (say keys).
f1c2 and f2c2 are different (say values).
Now I want to... -
why don't you just use basename and dirname commands.
Code:basename /home/root/usr2/testdir1 testdir1 dirname /home/root/usr2/testdir1 /home/root/usr2
Leave a comment:
-
Thanks everybody for the useful information and a very nice duscussion!Leave a comment:
-
sumittyagi replied to TRansferring a Zip file from a PC having Windows XP prof as OS to AIX box using puttyin LinuxYou can also use cmd (MS Dos) to transfer file through ftp. I normally use ftp for this purpose.
run cmd and run the below commands on it.
Code:cd <directory path where your source file is located.> ftp <aix server name/ip address> <give user id and password> cd <directory path where you want to put the file> put <file name> bye exit
Leave a comment:
-
If i want to tar and zip a directory, then can I use the following command?
and also, will it tar and then zip the tar file, or it will zip all the files in the directory and then tar?Code:tar -zcvf <directory_name> tar_file_name
Leave a comment:
-
sumittyagi replied to How to get available physical memory using javascript/VBScript NOT USING WMI ??in JavascriptQuestion 1:- Why do you want to get available physical memory for the client. I can unerstand if someone wants know physical memory of the server (to know how much space is left to save/process data); But client acts only the role of presentation layer and submiting requests to the server.
Question 2:- Why a client will allow accessing its physical memory when it knows there are lots of malicious scripts are waiting for such information....Leave a comment:
-
You must understand two things for developing web applications:-
1. Client side programming (scripting).
2. Server side programming.
When client submits the request then(and only then) server gets the control.
Now you want to control how client submits the request, so that needs client side scripting (server can't help you in this as he is sitting miles away from your computer).
Now what is AJAX!...Leave a comment:
-
-
-
I agree with Dormilich, I faced the same problem with another name conflict. So always use variable names that do not conflict any predefined js functions or variables.Leave a comment:
-
I just forgot to tell you that images takes their own request, and each image display needs to be treated as separate request.
See this thread for a discussion on the same topic....Leave a comment:
-
Thanks a lot Bernd,
I will try it out!!!
Regards,
Sumit Tyagi...Leave a comment:
-
I actually wanted to get a csv file for a result from a sql query.
The file is getting created, but I suppose unix don't treat \n as newline. It is replacing \n by a space in the file.
I also tried \r\n like this:
nawk 'ORS=NR%3?RS:"\ r\n"' RS="," filename
In this case, newline is done but the file gets truncated abruptly in between when I use cat, pg or vi to see the...Leave a comment:
-
-
replacing comma with newline
Hi all,
In ksh script, I have a comma separated list. I want to replace every third comma with newline. Please assist me in this.
Thanks a lot! -
Now comming to javascript part:-
Ajax currently returns only two types of responses, XML and text) it doesn't return other format. So you can't use ajax for this purpose, (as you can see from dmjpro's reply).
Now images make their own separate request, so just use images, don't get complicated by using iframes.
<img src="<path to your servlet>" id="target_img" >
Now...Leave a comment:
No activity results to display
Show More
Leave a comment: