10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a text file with different results and I would like to add single quotes to the value after the given pattern '='
This would be the original text file:
user_id=7492 and key=clickid;
user_id=7867 and key=clickid;
user_id=8649 and key=clickid;
And I would like the output to be... (9 Replies)
Discussion started by: mac-arrow
9 Replies
2. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
3. Shell Programming and Scripting
this is the requirement
list.txt
table1
table2
table3
testfile.txt
name#place#data#select * from table1
name2#place2#data2#select * from table 10 innerjoin table3
name2#place2#data2#select * from table 10
output
name place table1
name2 place table3
i tried using awk (7 Replies)
Discussion started by: vamsekumar
7 Replies
4. Shell Programming and Scripting
Hi All,
I need to serach and replace a strings between single quote in a file.
My file has :
location='/data1/test.log' and the output needed is
location='/data2/test_dir/test.log'
pls if anybody know this can be done in script sed or awk.
I have a script, but it's... (6 Replies)
Discussion started by: mnmonu
6 Replies
5. Shell Programming and Scripting
i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies
6. Shell Programming and Scripting
Hi,
I have a data in a file like below -
andy 22 abc 30000 wallstreet
paul 30 xyz 40000 martstreet
john 35 abc 50000 martstreet
I want to search number of employees working in a particular company. Below query executes perfectly -
awk '/abc/{ COUNT ++; }END { print "number of... (3 Replies)
Discussion started by: shell123
3 Replies
7. Shell Programming and Scripting
Hi All,
I have multiple lines in a file like:-
"abc" def "ghi" jkl "mno" 1
I want to print in output:-
abc/ghi/mno 1
How can I do this in perl?
Regrds,
Nilabh
-----Post Update-----
Additional info:-
The last field of the file should be output as it is.In the above example 1 is... (6 Replies)
Discussion started by: nilabh_s
6 Replies
8. Shell Programming and Scripting
I need to get the output in row wise for the repeated column data
Ex:
Input:
que = five
ans = 5
que = six
ans = 6
Required output:
que = five six
ans = 5 6
Any body can guide me?"""""" (2 Replies)
Discussion started by: vasanth_vadalur
2 Replies
9. Shell Programming and Scripting
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
Discussion started by: pitagi
7 Replies
10. Shell Programming and Scripting
Hi All,
The following is the scenario
id name
--------------
1 William;Johnson
2 Azim;Abdul
3 Grasim
.
.
etc....
I need the following output
id name
--------------
1 William
1 Johnson
2 Azim (2 Replies)
Discussion started by: kottursamy
2 Replies