10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
2. Shell Programming and Scripting
For a given string that may contain any ASCII chars, i.e. that matches .*,
find and print only the chars that are in a given subset.
The string could also have numbers, uppercase, special chars such as ~!@#$%^&*(){}\", whatever a user could type in
without going esoteric
For simplicity take... (1 Reply)
Discussion started by: naderra
1 Replies
3. UNIX for Beginners Questions & Answers
Hi Guys
Kindly help me on my predicament. I want to get the 7 chars of this filename
I need to get the ALL.cmd from this filehame filename_a_ALL.cmd
Thanks (10 Replies)
Discussion started by: cmarzan
10 Replies
4. Shell Programming and Scripting
What i'm trying to do here is show X amount of lines before and after the string "serialNumber" is found.
BEFORE=3
AFTER=2
gawk '{a=$0} {count=0} /serialNumber/ && /./ {for(i=NR-'"${BEFORE}"';i<=NR;i++){count++ ;print a}for(i=1;i<'"${AFTER}"';i++){getline; print ; count ++; print... (5 Replies)
Discussion started by: SkySmart
5 Replies
5. Shell Programming and Scripting
Hi,
I have the following input in a file & need output as mentioned below(need counter of every occurance of field which is to be increased by 1).
Input:
919143110065
919143110065
919143110052
918648846132
919143110012
918648873782
919143110152
919143110152
919143110152... (2 Replies)
Discussion started by: siramitsharma
2 Replies
6. Shell Programming and Scripting
Hi All,
This might be a basic question... I need to write a script to find all/any Speacial/Null/Control Chars and Print Line Numbers from an input file.
Output something like
Null Characters in File Name at : Line Numbers
Line = Print the line
Control Characters in File Name at : Line... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies
7. Shell Programming and Scripting
Hi, I'm having trouble with awk print all characters between 2 patterns. I tried more then one solution found on this forum but with no success.
Probably my mistakes are due to the special characters "" and "]"in the search patterns.
Well, have a log file like this:
logfile.txt
... (3 Replies)
Discussion started by: ginolatino
3 Replies
8. Shell Programming and Scripting
Hi all,
I have a file having data like this:
rs4332761 15XB
rs4332761 unk
rs4571228 15XB
rs457263 5XB
rs4606515 10XA
rs4606515 10XB
rs4606515 15XB
I want output like this:
rs4332761 15XB,unk
rs4571228 15XB
rs457263 5XB
rs4606515 10XA,10XB,15XB
I... (2 Replies)
Discussion started by: pirates.genome
2 Replies
9. Shell Programming and Scripting
how can i print all the chars of a string one by line?
i have thought that use a for cicle and use this command inside:
${VARIABLE:0:last}but how can i make last? because string is random
P.S. VARIABLE is the string
or can i make a variable for every chars of this string?
this was my idea... (10 Replies)
Discussion started by: tafazzi87
10 Replies
10. Shell Programming and Scripting
I have a sorted file like:
Apple 3
Apple 5
Apple 8
Banana 2
Banana 3
Grape 31
Orange 7
Orange 13
I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found.
so the output would look like:
Apple 8 3
Banana... (2 Replies)
Discussion started by: dcfargo
2 Replies