10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to script the below, but I am not very good at it :(
Your help would be greatly appreciated.
1. read all files in the directory in strings
strings *.*
2. in each file, for each line that contains "ABCD", store characters located at position 521 and 522 of this line... (9 Replies)
Discussion started by: clippertm
9 Replies
2. Shell Programming and Scripting
Hi,
I would like to find a 3-letter character series in a string/variable and replace it with x's.
An example set of strings is:
563MS333_101_afp_400-100_screening
563MS333_104-525_rjk_525_screening
563MS333_110_dlj_500-100_w24
563MS333_888-100_mmm_424_screening
The only constants... (5 Replies)
Discussion started by: goodbenito
5 Replies
3. Shell Programming and Scripting
Hello all,
I have a directory with 2000+ files. I need to look in each file for an invoice number. To identify this, i can search for the string 'BIG' and then retrieve the next 30 characters. I was thinking awk for this, but not sure how to do it. Each file contains one long string and in... (8 Replies)
Discussion started by: jdinero
8 Replies
4. Shell Programming and Scripting
Hi,
I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat.
My OS is:
SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies
5. Shell Programming and Scripting
Hi,
I have a xml file (Config.xml)
<Header name="" TDate="" PDate="">
<Config>
{"config" { "Nation" "Pri:|Sec:"}}
</Config>
</Header>
Now I wanted to printed all the strings between "". I tried the following
cat Config.xml | sed -n 's/.*\.*//p'
... (8 Replies)
Discussion started by: vivek_damodaran
8 Replies
6. Shell Programming and Scripting
I have a list of strings, for example:
set strLst = "file1 file2 file3 file4"
I want to log an error if some of the fields happen to begin with -, or have characters like ; : ' , ? ] { =
Which means for example setting
set ierr = 1 (2 Replies)
Discussion started by: kristinu
2 Replies
7. UNIX for Dummies Questions & Answers
done some homework on this--
after i remove up to and including the ) i want to take newfile.txt and use that list to remove the files from a file in my the directory pwd
i have a input.txt file
cat input,txt
1)mary.jpg
12)john.jpg
100)frankkfkdf .jpg
i want to remove the characters in the... (1 Reply)
Discussion started by: plener
1 Replies
8. UNIX for Dummies Questions & Answers
Well, I've searched the forum, but couldn't find an option, that would help me. I'm really a dummie in unix, so here it goes.
I've got like 50k files in a single catalogue. One of them contains a string:
Including the box/square brackets. I tried to find it manually, and use some search... (2 Replies)
Discussion started by: kalik
2 Replies
9. Shell Programming and Scripting
I am trying to create a script to search for a string within a file, and if found, return the next two lines.
Example file:-
msj
mh
query
return this 1
return this 2
mjk
mhj
query
return this 3
return this 4
So the script would identify the string "query" and then return the lines... (10 Replies)
Discussion started by: daveaasmith
10 Replies
10. UNIX for Dummies Questions & Answers
Can I get some help on this please, I have looked at the many post with similar questions and have tried the solutions and they are not working for my scenario which is:
I have a text file (myfile) that contains
b_log=$g_log/FILENAME.log
echo "Begin processing file FILENAME " >> $b_log
... (4 Replies)
Discussion started by: CAGIRL
4 Replies