10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file testarun.txt contains the below lines and i want to print the lines if the character positions 7-8 matches 01.
201401011111
201401022222
201402013333
201402024444
201403015555
201403026666
201404017777
201404028888
201405019999
201405020000
I am trying the... (4 Replies)
Discussion started by: Arunprasad
4 Replies
2. Shell Programming and Scripting
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
3. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
4. Shell Programming and Scripting
Hi experts,
My csv file looks like this
U;cake;michael;temp;;;;
U;bread;john;temp;;;;
U;cocktails;sarah;temp;;;;
I'd like to change the value fo 2nd column to cf+random number , which will look maybe something like this
U;cf20187;michael;temp;;;;
U;cf8926;john;temp;;;;... (7 Replies)
Discussion started by: tententen
7 Replies
5. Shell Programming and Scripting
Hi,
I have a file a.txt having no delimiter.
I want to exclude the line which contains 435th character as 1 or 2 and redirect the rest of the lines to another file b.
Can you pls suggest how to do this in one liner awk.
Following is just one line of the input file a:-
120110116 ... (10 Replies)
Discussion started by: millan
10 Replies
6. Shell Programming and Scripting
Source File:
abcdefghijklmnop01qrstuvwxyz
abcdefghijklmnop02qrstuvwxyz
abcdefghijklmnop03qrstuvwxyz
abcdefghijklmnop04qrstuvwxyz
abcdefghijklmnop05qrstuvwxyz
Whatever characters are in 17-18 on each line of the file, it should be concatenated to the same line at the character number... (6 Replies)
Discussion started by: tamahomekarasu
6 Replies
7. Shell Programming and Scripting
Hi
I have lines like this
a=1, b=2, c=3,
a=1, d=4, e=5, b=225,
I need to extract the b=nnn... value. I dont know how many other entries will be before and after it in each line. Ive tried a basic line like
awk '/b=/, $NF ~ /,/ ' myfile.txt
but I think that it doesnt care which comma it... (5 Replies)
Discussion started by: rebelbuttmunch
5 Replies
8. UNIX for Advanced & Expert Users
hi every one
plz help me
i want to search for a line contains tabspace
This is a line The should be changed
see the above line is seperated with tab space i want to replace that tab space in to # as
This is a line#The should be changed
i have tried with... (4 Replies)
Discussion started by: kkraja
4 Replies
9. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
10. Shell Programming and Scripting
Hi,
I have a file which contains many occurances of a string say "hellosunil".
I want to insert a newline charcater after all the "hellosunil" strings in the file.
trying to use sed,
sed -e 's/hellosunil/\\nhellosunil/g' file1
sed help says u cannot substitute a regular expression... (6 Replies)
Discussion started by: sunil_neha
6 Replies