10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have file a.txt
I want to add a counter loop at the end of each line in a file
ill explain:
i have a site h**p://test.test=Elite#1
i want to add a a counter to the number at the end of the file, that it will be like this
urlLink//test.test=Elite#1
urlLink//test.test=Elite#2... (3 Replies)
Discussion started by: nexsus
3 Replies
2. Shell Programming and Scripting
Hi,
i have a scenario were i should compare a few fields from each line then increment a variable based on that.
Example file
989878|8999|Y|0|Y|N|V
989878|8999|Y|0|N|N|V
989878|8999|Y|2344|Y|N|V
i have 3 conditions to check and increment a variable on every line
condition 1 if ( $3... (4 Replies)
Discussion started by: selvankj
4 Replies
3. UNIX for Dummies Questions & Answers
if I wanted to know if the word DOG(followed by several random numbers) appears in col 1, how many times will that same word DOG* appeared in col 2? This is a very large file
Thanks! (7 Replies)
Discussion started by: verse123
7 Replies
4. Shell Programming and Scripting
Hi
I have a file like below
############################################
# ParentFolder Flag SubFolders
Colateral 1 Source1/Checksum
CVA 1 Source1/Checksum
Flexing 1 VaR/Checksum
Flexing 1 SVaR/Checksum
FX 1 ... (5 Replies)
Discussion started by: manas_ranjan
5 Replies
5. Shell Programming and Scripting
I was told a way to do this with awk earlier today but is there a way with sed to specify the last instance of a character on a line?
You will know what character you're looking for but there could be none or one hundred instances of it on a line say and you ONLY want to specify the last one for... (3 Replies)
Discussion started by: Bashingaway
3 Replies
6. Shell Programming and Scripting
I have a record like the one given below.
010000306551~IN ~N~ |WINDWARD PK|Alpharetta|
If ~ is present more than instance in a line,then I need to delete those instances.
Any ideas?
I am working in Solaris (7 Replies)
Discussion started by: prasperl
7 Replies
7. Shell Programming and Scripting
Hello forum,
I need help with a script for displaying the number of instances/times a particular line appears in a tab-delimited file and append that number to the end of the line.
Example text file:
aaa bbb ccc ddd
ggg hhh kkk nnn
aaa bbb ccc ddd
aaa bbb ccc ddd
ppp qqq nnn sss
ggg... (1 Reply)
Discussion started by: jaysean
1 Replies
8. Shell Programming and Scripting
Say I have (in psuedocode)
For i=1 to 10
tar cvfb /... 5*i /junk(i)
end
What I mean is that I want each successive for loop to have the block size parameter be 5 times the current counter. This isn't my actual code, just a stupid example...So the question is how do I descrive that parameter... (2 Replies)
Discussion started by: jeriryan87
2 Replies
9. Shell Programming and Scripting
Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7
3 Replies
10. Programming
Hello Experts,
I am beginner to C language..
I know I am making a simple mistake but I dont know what the problem here
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
FILE* fh;
char s;
int i;
int count =10;
double a,b;
printf("COUNT=... (6 Replies)
Discussion started by: user_prady
6 Replies