07-10-2013
- Just overwrite the old file with a redirection like echo "" > input.txt
- Read input with a prompt can be achieved with read. Else could use positional shell parameters of the shell like $1, $2, ...
- For writing input.txt, redirect as said.
Try it, show your efforts. Ask if you get stuck showing your code.
According to your code in post
https://www.unix.com/shell-programmin...only-once.html you should be able to get a start going.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to take the totals from my script and input them into a excel spreadsheet. Right now, I just copy and paste. Is there an easier way?
3906
is the total jobs in ABEND state
4005
is the total jobs in SUCC state
1050
is the total jobs in HOLD state (1 Reply)
Discussion started by: wereyou
1 Replies
2. UNIX for Dummies Questions & Answers
I have some files created in Excel that have to be saved as .txt files in order to load them into our accounting system. I can save the files as .txt files through Excel, but I then have to open them in TextPad and do a save as to change the Format from PC to UNIX. Is there a way to skip this step... (2 Replies)
Discussion started by: jroyalty
2 Replies
3. Shell Programming and Scripting
Hi there,
my ksh script collects a procstack trace for a particular pid and then greps it by a transaction id to find out the pthread ID:
---------- tid# 1876087 (pthread ID: 4466) ----------
So the pthread ID I want is 4466 in this case, and it is assighed to the variable $pthread.... (4 Replies)
Discussion started by: tmf33uk
4 Replies
4. Shell Programming and Scripting
Hi,
I'am using "time" to check execution time of some script. Is there any possibility to save time command result into a file ? (2 Replies)
Discussion started by: Physix
2 Replies
5. Shell Programming and Scripting
Hi,
i have 2 input files which are file1.txt and file2.txt. I need to extract data from file1.txt and file2.txt and save it in file3.txt like example below:-
File1.txt
ID scrap1
Name scrap1
start 1
end 10
ID scrap2
Name scrap2
start 11
end ... (4 Replies)
Discussion started by: redse171
4 Replies
6. Shell Programming and Scripting
Hello,
I have a note pad at /usr/abc location with the following content, since it is a huge file i need to split it into multiple .txt files.
A123|akdhj |21kjsdff |b212b1b21 |0
A123asdasd |assdd |asdasdsdqw|6
A123|QEWQ |NMTGHJK |zxczxczx|3
A123|GEGBGH |RTYBN ... (15 Replies)
Discussion started by: j_panky
15 Replies
7. Shell Programming and Scripting
Hi Guys,
I have blank file A.txt
I will run the script xyz.sh
First i want to open a.txt file...
Now i will enter some data like
XYZ
ABC
PQR
..
Save it and keep continue my script....
END of my script.
Thanks (1 Reply)
Discussion started by: asavaliya
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change in string2 and the new stringname in string3. Does anyone know a way of doing this? I have... (1 Reply)
Discussion started by: Grueben
1 Replies
9. Shell Programming and Scripting
Hi dears
i have text file like this:
INPUT.txt
001_1_173 j nuh ]az
001_1_174 j ]esma. nuh ]/.xori
.
.
. and have another text
like this
TABLE.txt
j j
nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
10. Shell Programming and Scripting
Hi dears
i use bash shell
i have INPUT.txt
like this
number of columns different in one
some row have 12 , some 11 columns
see last column
INPUT.txt
CodeGender Age Grade Dialect Session Sentence Start End Length Phonemic Phonetic
63 M 27 BS/BA TEHRANI 3 4 298320 310050... (2 Replies)
Discussion started by: alii
2 Replies
LEARN ABOUT DEBIAN
bp_revtrans-motif
BP_REVTRANS-MOTIF(1p) User Contributed Perl Documentation BP_REVTRANS-MOTIF(1p)
NAME
revtrans-motif - Reverse translate a Profam-like protein motif
VERSION
Version 0.01
SYNOPSIS
From a file:
revtrans-motif.pl -i motifs.txt
Using pipes:
revtrans-motif.pl < motifs.txt > output.txt
Using interactively at the command prompt:
$ revtrans-motif.pl
MAAEEL[VIKP]
1. ATGGCNGCNGARGARYTNVHN
[^P]H(IW){2,3}
2. NDNCAY(ATHTGG){2,3}
DESCRIPTION
This script takes a protein motif as input and returns a degenerate oligonucleotide sequence corresponding to it. The main reason for doing
this is to design degenerate primers that amplify a given sequence pattern.
The input motif consists of a string of one-letter residues, with any of the following syntactic elements:
[...] : Redundant position.
A position in which more than one residue is allowed. Example:
[TS]YW[RKSD]
^^ ^^^^
[^...] : Negated position.
A position in which any residue is allowed, saved for those between brackets. Example:
[^PW]MK[LAE]
^^
(...){n,m,...} : Repeated motif.
A motif that is repeated n or m times. It can have any of the previous syntactic elements. Example:
A[SN]C(TXX){2,4,8}
^^^
The allowed letters are those that correspond to the 20 natural aminoacids, plus:
B = N + D
Z = Q + E
X = All
OPTIONS
-i input-file:
A file with a list of motifs to reverse translate.
-h
Display this help message.
AUTHOR
Bruno Vecchi, "vecchi.b at gmail.com"
BUGS
Please report any bugs or feature requests to "vecchi.b at gmail.com"
COPYRIGHT & LICENSE
Copyright 2009 Bruno Vecchi, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-02 BP_REVTRANS-MOTIF(1p)