10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below awk is supposed filter $8 of example.txt using the each line in gene.txt. I think it is but why is it renumbering the 1,2,3 in $1 to 28,29,394? I have attached the data as it is large, example.txt is the file to be searched, gene.txt has the lines to match, and filtered.txt is the current... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Hi I am in a bind, I need create a script that will rename files as they come into a folder with sequential numbering at the begining starting at 1 and proceeding to ten then starting at 1 again. Such as 1_filename.pdf, 2_filename.pdf, 3_filename.pdf, 4_filename.pdf, 5_filename.pdf, 6_filename.pdf,... (6 Replies)
Discussion started by: Paul Walker
6 Replies
3. Shell Programming and Scripting
Hi
I have a file like this:
Peter North
Mary
Peter North
Peter Borough
Mary
I need there to put 'X' (or anything) on a new line between the two lines where 'Peter' begins the line. There will be many matches to this string, but they will always begin with 'Peter'.
Ie, the resulting... (2 Replies)
Discussion started by: majormajormajor
2 Replies
4. Shell Programming and Scripting
Hi,
I want to do the following:
Extract some lines from different files and copy them into one file, with the first column being the line number. I do this with
cat file1 file2 file3 |grep 'xxx' |nl > output.file
Works fine. But if I want to add data of interest from a fourth file to the... (2 Replies)
Discussion started by: paracetamol
2 Replies
5. Shell Programming and Scripting
Hi
I have a file sequential way i.e. written in contineous mode and the Record Seperator is AM from which the record is seperated .Now to process I have to make line sequential,and more over record length is not same it varies as per the input address,
AM1234563 John Murray 24 Old streeet old... (5 Replies)
Discussion started by: vakharia Mahesh
5 Replies
6. UNIX for Dummies Questions & Answers
I am using ghostscript to convert a multi-page pdf file to individual jpg files. I am wondering if there is a way to get ghostscript to start numbering the output jpg files from zero? What i am trying to convey is that it starts naming my files from page_001.jpg, page_002.jpg, etc., and would like... (0 Replies)
Discussion started by: RacerX
0 Replies
7. Shell Programming and Scripting
I have a simple text file.
I want to number each line in that file .
for example:
My text file is
unix
my file
test
My output should be
1 unix
2 my file
3 test (5 Replies)
Discussion started by: pitagi
5 Replies
8. Shell Programming and Scripting
I'm pretty new to sed and awk, and I can't quite figure this one out. I've been trying with sed, as I'm more comfortable with it for the time being, but any tool that fits the bill will be fine.
I have a few files, whose contents appear more or less like so:
1|True|12094856|12094856|Test|... (7 Replies)
Discussion started by: camwheel
7 Replies
9. Shell Programming and Scripting
I have a set of files of multi-line records with the records separated by a blank line. I needed to add a record number to the front of each line followed by a colon and did the following:
awk 'BEGIN {FS = "\n"; RS = ""}{for (i=1; i<=NF; i++)print NR,":",$i}' ~/Desktop/data98-1-25.txt >... (3 Replies)
Discussion started by: RacerX
3 Replies
10. Programming
We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies