09-06-2012
Show some input and matching output please.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have several files that are being generated every 20 minutes. Each file contains 2 columns. The 1st column is Text, 2nd column is Data.
I would like to generate one single file from all these files as follows:
One instance of 1st column Text, followed by 2nd column Data separated by... (5 Replies)
Discussion started by: subhap
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have several text files. One main file contains the detail data, other have some information to extract data from the main file, and some are empty files. Examples are shown below:
The main file look like:
MainFile.txt
>Header1
data1...data1...
>Header2
data2...data2...
...
...... (2 Replies)
Discussion started by: Fahmida
2 Replies
3. UNIX for Dummies Questions & Answers
I would like to write a for loop that does the following:
I have a file called X.txt and other files called 1.txt,2.txt, .....,1000.txt.
I want to substitute the 6th column of the file X.txt with 1.txt and store the output as X.1. Then I want to do the same with X.txt and 2.txt and store the... (1 Reply)
Discussion started by: evelibertine
1 Replies
4. UNIX for Dummies Questions & Answers
I have a script where the the 9th line looks like this:
$filename=sprintf("250.1chr%d.ped", $N);
I want to modify this script 1000 times, changing 250.1chr%d.ped to 250.2chr%d.ped, 250.3chr%.ped.......and so on all the way to 250.1000chr%d.ped and store each output in files called
... (4 Replies)
Discussion started by: evelibertine
4 Replies
5. Shell Programming and Scripting
I want to write a Perl script that manipulates multiple files. In the directory, I have files 250.*chr$.ped where * is from 1 to 1000 and $ is from 1-22 for a total of 22 x 10,000 = 22,000 files.
I want to write a script that only manipulates files 250.1chr*.ped where * is from 1 to 22.... (10 Replies)
Discussion started by: evelibertine
10 Replies
6. UNIX for Dummies Questions & Answers
I have 100 data files labelled 250.1.txt through 250.100.txt. The second column of the data files partially match (there is about %90 overlap). Each data file has 4 columns.
I want the merge all these text files by the matching values in the second column. In the output, the first column should... (1 Reply)
Discussion started by: evelibertine
1 Replies
7. UNIX for Dummies Questions & Answers
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
Discussion started by: evelibertine
4 Replies
8. UNIX for Dummies Questions & Answers
Hi
I have 1000 files labelled data1.txt through data1000.txt. I want to write a script that prints out the number of lines in each txt file and outputs it in the following format:
Column 1: number of data file (1 through 1000)
Column 2: number of lines in the text file
Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
10. Shell Programming and Scripting
This is my code
cat /path/file |
while read host
do
echo "\nPINGING $host"
ip=`eval "$host | cut -c14-28"`
echo $ip
ping $ip
sleep 2
done
the file contains a list of hostnames and IP addresses in format
HOSTNAMEXXXX,168.192.100.150 (10 Replies)
Discussion started by: ditnl555v
10 Replies
LEARN ABOUT DEBIAN
bomstrip
BOMSTRIP(1) BSD General Commands Manual BOMSTRIP(1)
NAME
bomstrip, bomstrip-files -- strip the BOM sequence from UTF-8 files
SYNOPSIS
bomstrip
bomstrip-files file ...
DESCRIPTION
The bomstrip utility reads UTF-8 data from its standard input and copies it to its standard output, stripping the BOM (byte-order mark) from
the beginning of the text if it is present. There are no command-line options and no parameters.
The bomstrip-files utility removes the UTF-8 BOM from the specified files, saving each file's original contents with a .bom extension. It
uses the bomstrip utility, trying to execute it as ``bomstrip''; if the bomstrip utility is installed under another name, or if a more com-
plex command is desired, it may be supplied in the BOMSTRIP environment variable.
EXAMPLES
Strip the BOM, if present, from a text file:
bomstrip < bom.txt > nobom.txt
Strip the BOM, if present, from all text files, backing them up with a .bom extension:
bomstrip-files *.txt
Use the OCAML implementation of bomstrip:
env BOMSTRIP='ocaml bomstrip.ocaml' bomstrip-files *.txt
SEE ALSO
The bomstrip home page: http://www.xs4all.nl/~mechiel/projects/bomstrip/
HISTORY
The bomstrip utility (in many languages) was written by Mechiel Lukkien, with implementations in various languages sent to him by others,
including Andreas Gohr, Andrew Gerrand, Berteun Damman, Matthijs Bomhoff, Peter Pentchev, and Ruben Smelik. The bomstrip-files utility and
this manual page were written by Peter Pentchev in the hope that they reflect the behavior of all the bomstrip implementations in all lan-
guages.
AUTHORS
Mechiel Lukkien <mechiel@xs4all.nl>
Peter Pentchev <roam@ringlet.net>
BSD
June 14, 2008 BSD