10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello all, I am having trouble with what should be an easy task, but seem to be missing something fundamental. I have two files, with File 1 consisting of a single field of many thousands of records. I also have File 2 with two fields and many thousands of records.
My goal is that when $1 of... (2 Replies)
Discussion started by: jvoot
2 Replies
2. UNIX for Beginners Questions & Answers
In two previous posts (here) and (here), I received help from forum members comparing multiple fields across two files and selectively printing portions of each as output based upon would-be matches using awk. I had been fairly comfortable populating awk arrays with fields and using awk's special... (3 Replies)
Discussion started by: jvoot
3 Replies
3. Shell Programming and Scripting
Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on how to go about it
Input
fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30... (11 Replies)
Discussion started by: 100bees
11 Replies
4. Shell Programming and Scripting
Hi,
I have field in a file which would come with any special character, how do i check that field?
Eg: @123TYtaasa>>>/ 131dfetr_~2
In the above example, how do I add pattern for any special character on the keyboard.
Thanks (3 Replies)
Discussion started by: techmoris
3 Replies
5. Shell Programming and Scripting
AWK help:
I have a file with following format. I need to remove any entries which are repeated based on first 3 characters. So from the following files I need to remove any entries start with "mas".
mas01bct
mas02bct
mas03bct
mas01bct
mas01bct
mas01bct
mas11bct
mas01bct
mas01bct... (11 Replies)
Discussion started by: amir07
11 Replies
6. Shell Programming and Scripting
Hi,
I have a file 'imei_01.txt' having the following contents:
$ cat imei_01.txt
a123456
bbr22135
yet223
where I want to check whether the expression 'first single alphabet followed by 6 digits' is present in the file (here it is the first record 'a123456')
I am using the following... (5 Replies)
Discussion started by: royalibrahim
5 Replies
7. UNIX for Dummies Questions & Answers
Alright, I am stuck here.
I have this variable that stores the word = HELLO and I have converted it it to -----
I have asked user to input one character at a time. SAy, if they enter E.
Therefore, I need to search 2nd character and input E there.
makes it -E--- (other checkings have been... (2 Replies)
Discussion started by: felixwhoals
2 Replies
8. Shell Programming and Scripting
Hello Experts,
Can someone help me here:
I have a variable which contains a string with "".
set var1 {a}
set str1 {a is the element i want to match}
Now "regexp $var1 $str1" does not work?
("regexp {a\} $str1" works, but var1 gets it's value automatically from another script)
Is... (6 Replies)
Discussion started by: sumitgarg
6 Replies
9. Shell Programming and Scripting
Hi
] && exit 0
Although it, the $answer, is 'y', the test operation returns true.
&& exit 0
This works but I want to do multiple choice matching.
I don't want to do like:
Please help (2 Replies)
Discussion started by: lalelle
2 Replies
10. UNIX for Dummies Questions & Answers
Is there a way to pull out a character at a time from a work in unix, using a shell script? (1 Reply)
Discussion started by: Rukshan
1 Replies