9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
im trying to search for a WORD in a file which
begins with a number
followed by a hypen
follwed multiple words
and end with a dot "."
and pront the entire line which matches the above.
Please note that there is a space at the begining of each line
i/p file
19458 00000-CONTROL-PARA.... (5 Replies)
Discussion started by: anijan
5 Replies
2. Shell Programming and Scripting
OS : Oracle Linux 6.5
Shell : bash
I have a file whose contents look like below. I want to count the number of occurences of strings starting with 3-.
How can I do this ? I couldn't wordwrap the below line. Hence it looks long.
'3-90892405251', '3-90892911050', '3-90893144163',... (8 Replies)
Discussion started by: John K
8 Replies
3. Shell Programming and Scripting
Hi Guys..
I have a file and i want to extract all words that starts with a pattern 'ABC_' or 'ADF_'
For example,
ABC.txt
----
INSERT INTO ABC_DLKFJAL_FJKLD
SELECT DISTINCT S,B,C FROM ADF_DKF_KDFJ_IERU8 A, ABC_LKDJFREUE9_FJKDF B
WHERE A.FI=B.EI;
COMMIT;
Output : ABS_DLKFJAL_FJKLD,... (5 Replies)
Discussion started by: Pramod_009
5 Replies
4. Shell Programming and Scripting
I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX.
awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile
But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies
5. Shell Programming and Scripting
Hi Geeks,
Consider this line:
driver=c:\folder1\folder2
The above line is contained in a variable say 'var' . I want to copy everything after 'driver=' in to another variable say var2.
Please tell me how can this be done. (8 Replies)
Discussion started by: ajincoep
8 Replies
6. Shell Programming and Scripting
Hi Guys,
I have a file like this:
wwwe 1 ioie ewew yyy uuu 88
erehrlk 4 ihoiwhe lkjhassad lkhsad yyy mmm 45
jhash lhasdhs lkhsdkjsn ouiyrshroi oihoihswodnw oiyhewe yyy ggg 77
I want to remove everything after "yyy" and including "yyy" from each line in the file.
So I want:... (2 Replies)
Discussion started by: npatwardhan
2 Replies
7. Shell Programming and Scripting
can u help me out to print last two words of each sentence of a file.
for example.
contents of input file:
i love songs
my favourite songs
sent
songs all kind
good buddy
Ouput file should contain:
love songs
favourite songs
sent
all kind
good buddy (5 Replies)
Discussion started by: pradeepreddy
5 Replies
8. Shell Programming and Scripting
Hi,
I want to Print starting 3rd line until end of the file. Pls let me know the command.
Thanks in advance. (1 Reply)
Discussion started by: smc3
1 Replies
9. UNIX for Dummies Questions & Answers
Hi There
Kindly inform me on how to start and stop the print services in Unix from the command line. (2 Replies)
Discussion started by: esh
2 Replies