10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
So I have to remove all the @hostnames from a file, the problem is, there are instances where @ is used for other things... For example:
example text:
@This is some text in between some at signs@
@This is some more text@
This is a line that will contain a username and his/her... (5 Replies)
Discussion started by: joeg1484
5 Replies
2. UNIX for Beginners Questions & Answers
I am trying to consolidate multiple information files (<hostname>.Linux.nfslist) into one file so that I can import it into Excel. I can get the file contents with cat *Linux.nfslist >> nfslist.txt. I need each line prefaced with the hostname. I am unsure how to do this.
--- Post updated at... (5 Replies)
Discussion started by: Kentlee65
5 Replies
3. Shell Programming and Scripting
hdr=$(cut -c1 $path$file|head -1)#extract header”H”
trl=$(cut -c|path$file|tail -1)#extract trailer “T”
SplitFile=$(cut -c 50-250 $path 1$newfile |sed'$/ *$//' head -1')# to trim white space and extract table name
If; then # start loop if it is a header
While read I #read file
Do... (4 Replies)
Discussion started by: SwagatikaP1
4 Replies
4. Shell Programming and Scripting
Hi
I have a text file named main.txt with 10,000 lines. I have another file with a list of line numbers (around 1000) of the lines to be deleted from main.txt file.
I tried with sed but it removes only a range of line numbers.
Thanks for any help!! (1 Reply)
Discussion started by: prvnrk
1 Replies
5. UNIX for Dummies Questions & Answers
I have a directory having a number of pdf files.
I want to convert all the files to text, stored in a single text file
The following creates multiple text files
ls *.pdf | xargs -n1 pdftotext (1 Reply)
Discussion started by: kristinu
1 Replies
6. Shell Programming and Scripting
Hi,
Input
7488 7389 chr1.fa chr1.fa
3546 9887 chr5.fa chr9.fa
7387 7898 chrX.fa chr3.fa
7488 7389 chr21.fa chr3.fa
7488 7389 chr1.fa chr1.fa
3546 9887 chr9.fa chr5.fa
7898 7387 chrX.fa chr3.fa
Desired Output
7488 7389 chr1.fa chr1.fa 2
3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
7. UNIX for Advanced & Expert Users
I'm having a couple of issues. I'm trying to edit a nagios config and remove a host definition if a certain "host_name" is found. My thought is I would find host definition block containing the host_name I'm looking for and output the line numbers for the first and last lines. Using set, I will... (9 Replies)
Discussion started by: mglenney
9 Replies
8. Shell Programming and Scripting
I am working with single line file with 589744523 characters having 542 "^M" (line feed) character.
I want to make 542 different lines file from the single line file thr. shell program only (it can be done thr vi command)
rd
anil
sorry for duplicate post previously, actually i don,t know... (6 Replies)
Discussion started by: anil_kut
6 Replies
9. Shell Programming and Scripting
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
Discussion started by: lodhi1978
11 Replies
10. Shell Programming and Scripting
I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies