This should make file1.new, file2.new, file3.new, file4.new, file5.new. You can't just overwrite your input while you're using it, and you shouldn't destroy your input files until verifying the output is what you want.
I have the following script:
(echo -n `curl http://www.example.com/scores.txt | grep mylocation`; date +%Y%m%d%H%M%S) >> myscores.txt
This script works fine, except that it places the timestamp at the end of the file myscores.txt. How do add the timestamp as the first column and then a tab and... (4 Replies)
Hello,
I might require some help here.
I have a file, ITEMS with the below data :
A1 20 A2 A3
B1 40 B2 B3
C1 70 C2 C3
D1 90 D2 D3
I need the output as :
A2 A3 20
B2 B3 40
C2 C3 70
D2 D3 90
i.e, I need the sequence of columns to be changed and only 3 fields to be... (5 Replies)
Hi I need a bash shell script that will take text files with 4 rows and different numbers of columns in each row and convert each one into a text file with just one column.
I then subtract 1.5 from each number in the column (I have that part already)
The next step after that is I want to have... (10 Replies)
Hi all,
I have created a script which adding two columns and removing two columns for all files.
Filename: Cust_information_1200_201010.txt
Source Data:
"1","Cust information","123","106001","street","1-203 high street"
"1","Cust information","124","105001","street","1-203 high street"
... (0 Replies)
Hello everyone,
I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble.
I have many files each having two columns and hundreds of rows.
first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
---------- Post updated at 01:58 PM ---------- Previous update was at 01:48 PM ----------
For some reason my question is not getting printed. Here are the details:
Greetings.
I would like to add/subtact an integer to/from two columns of integers. I feel like this should be easy using awk... (3 Replies)
I have a document that has 7 columns.
eg.
$1 $2 $3 $4 $5 $6 $7
string string string string integer integer integer
The 6th and 7th columns are a mix of integers and floating decimals (with 4 decimal places). I need to convert the last 2 columns so that all values are floating decimals w/4... (1 Reply)
Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns.
I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
Dear all,
I have a file call test.txt which has 2000 columns, 1000 rows. If I want to trim all the columns to 3 decimal places, how can I do it? I know how to use awk prinf to trim specic columns. But I don't know how to trim all the columns. Thank you.
data sample:
0.976004565 9.34567845... (6 Replies)
Discussion started by: forevertl
6 Replies
LEARN ABOUT NETBSD
lam
LAM(1) BSD General Commands Manual LAM(1)NAME
lam -- laminate files
SYNOPSIS
lam [-f min.max] [-p min.max] [-s sepstring] [-t c] file ...
DESCRIPTION
lam copies the named files side by side onto the standard output. The n-th input lines from the input files are considered fragments of the
single long n-th output line into which they are assembled. The name ``-'' means the standard input, and may be repeated.
Normally, each option affects only the file after it. If the option letter is capitalized it affects all subsequent files until it appears
again uncapitalized. The options are described below.
-f min.max Print line fragments according to the format string min.max, where min is the minimum field width and max the maximum field
width. If min begins with a zero, zeros will be added to make up the field width, and if it begins with a '-', the fragment
will be left-adjusted within the field.
-p min.max Like -f, but pad this file's field when end-of-file is reached and other files are still active.
-s sepstring Print sepstring before printing line fragments from the next file. This option may appear after the last file.
-t c The input line terminator is c instead of a newline. The newline normally appended to each output line is omitted.
To print files simultaneously for easy viewing use pr(1).
EXAMPLES
The command
lam file1 file2 file3 file4
joins 4 files together along each line. To merge the lines from four different files use
lam file1 -S "
" file2 file3 file4
Every 2 lines of a file may be joined on one line with
lam - - < file
and a form letter with substitutions keyed by '@' can be done with
lam -t @ letter changes
SEE ALSO join(1), pr(1), printf(3)BSD December 1, 2001 BSD