10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can someone help me to make this code without cutting off words ni the string?
awk '{for(i=1;i<length;i+=100) print substr($0,i,100)}'
Thank you! (4 Replies)
Discussion started by: sanantonio7777
4 Replies
2. Shell Programming and Scripting
Hi All,
I have a log file in which name and version of applications are coming in the following format
name
It may look like following, based on the name of the application and version:
XYZ OR xyz OR XyZ OR xyz
I want to separate out the name and version and store them into variables.... (4 Replies)
Discussion started by: bhaskar_m
4 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I need some help with an awk command:
What I'm trying to do is append "MYGROUP: " to text with the substring "AT_"
the input file follows this format:
AT_xxxxxx
Name1
Name2
AT_xxxxxx
NameA
NameB
I want the output to be:
MYGROUP: AT_xxxxx
Name1
Name2
MYGROUP:... (2 Replies)
Discussion started by: bikecraft
2 Replies
4. Shell Programming and Scripting
Hi
I have a table like this
I want to know how many times the string in 2nd column appears in the first column as substring.
For example the first string of 2nd column "cgt" occurs 3 times in the 1st column and "acg" one time.
So my desired output is
THank you very much in advance:) (14 Replies)
Discussion started by: polsum
14 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a file on which i want to print the line which should match following criterias.
Line should not start with 0 or 9
and
Line should start with 1
and
(
576th character should not be 1 or 2
or
576-580 postion should not be NIPPF or CDIPB
or
576-581 postion should... (2 Replies)
Discussion started by: millan
2 Replies
6. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script to simplify some operations of creation file of spool for a Bulk-Copy. Thi is my code:
In a for cycle:
gzcat ${file} |awk '{ print substr($0,1,5)";"substr($0,108,122)";"substr($0,124,131)";"substr($0,139,152)";"substr($0,154,163)";"}' >>... (6 Replies)
Discussion started by: GERMANICO
6 Replies
7. Shell Programming and Scripting
Hi Gurus,I have a seemingly simple problem but struggling with it.It is as follows :
I/p string -
ABCDEFGHIJ20100909.txt
desired o/p -
AB,DEF,20100909,ABCDEFGHIJ20100909.txt
How to achieve it ?Thanks in advance.
Please use code tags, thank you (20 Replies)
Discussion started by: sumoka
20 Replies
8. Shell Programming and Scripting
Hi Team,
How to get the last 3 characters of a String irrespective of their length using awk?
Thanks
Kinny (5 Replies)
Discussion started by: kinny
5 Replies
9. Shell Programming and Scripting
I am trying to get a substring from a string stored in a variable. I tried sed with a bit help from this forum, but not successful. Here is my problem.
My string is: "REPLYFILE=myfile.txt"
And I need: myfile.txt (everything after the = symbol).
My string is: "myfile.txt.gz.20091120.enc... (5 Replies)
Discussion started by: jamjam10k
5 Replies
10. Shell Programming and Scripting
Hi guys, hopefully you can give me a hand with this before my monitor has a nasty accident! :mad:
I have the following line in a script:
awk 'int(substr($1,2,2))>'06' && int(substr($1,2,2))<'08' ' ANYOLDFILE.log
... which when ran against this data file:
... correctly... (3 Replies)
Discussion started by: dlam
3 Replies