01-09-2011
what have you tried so far? What are you trying to write it in? awk, shell, Perl?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have an file which looks like
country address phone amount
sweden |address |phone | 10 |
Singapo |address |phone | 20 |
Italy-N |address |phone | 30 |
denmar |address |phone | 40 |
Here i need to do the sum(amount), how to do this in shell scripting
Thanks
Babu (11 Replies)
Discussion started by: ksmbabu
11 Replies
2. Ubuntu
Hello,
I have a 1.6 GB file that I would like to modify by matching some ids in col1 with the ids in col 1 of file2.txt and save the results into a 3rd file.
For example:
File 1 has 1411 rows, I ignore how many columns it has (thousands)
File 2 has 311 rows, 1 column
Would like to... (7 Replies)
Discussion started by: sogi
7 Replies
3. Shell Programming and Scripting
Hi,
I have two different files, one has two columns and other has only one column. I would like to compare the first column in the first file with the data in the second file and write a third file with the data that is not present is not common to them.
First file:... (26 Replies)
Discussion started by: swame_sp
26 Replies
4. Shell Programming and Scripting
Hi,
My first file has
592155 9 rs16916098 1
592156 19 rs7249604 1
592157 4 rs885156 1
592158 5 rs350067 12nd file has
9 rs16916098 0 113228129 2 4
19 rs7249604 0 58709070 4 2
2 rs17042833 0 113558750 4 2... (2 Replies)
Discussion started by: genehunter
2 Replies
5. UNIX for Advanced & Expert Users
Hello everyone,
I am writing a script to process data from the ATP world tour.
I have a file which contains:
t=540 y=2011 r=1 p=N409
t=540 y=2011 r=2 p=N409
t=540 y=2011 r=3 p=N409
t=540 y=2011 r=4 p=N409
t=520 y=2011 r=1 p=N409
t=520 y=2011 r=2 p=N409
t=520 y=2011 r=3 p=N409
The... (4 Replies)
Discussion started by: imahmoud
4 Replies
6. Shell Programming and Scripting
Hello,
I have some tab delimited data and I need to move the last col. I could hard code it,
awk '{ print $1,$NF,$2,$3,$4,etc }' infile > outfile
but it would be nice to know the syntax to print a range cols.
I know in cut you can do,
cut -f 1,4-8,11-
to print fields 1,... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
7. Shell Programming and Scripting
Hi Friends,
This is the only solution to my task. So, any help is highly appreciated.
I have a file
cat input1.bed
chr1 100 200 abc
chr1 120 300 def
chr1 145 226 ghi
chr2 567 600 unix
Now, I have another file by name
input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies
8. Shell Programming and Scripting
Hi,
Please help with this.
I have several excel files (with and .xlsx format) with 10-15 columns each.
They all have the same type of data but the columns are not ordered in the same way.
Here is a 3 column example. What I want to do add the alphabet
from column 2 to column 3, provided... (9 Replies)
Discussion started by: newbie83
9 Replies
9. Shell Programming and Scripting
hello,
i have a undelimited file which contains 229 byte records. i want to change column 23 - 26 with a new value and also change the sign of the data in colulmn 30 - 70. i've tried SED for the first change, but nothing happens:
sed 's/\(^.\{22\}\).\{4\}\(.*\)/\0603\2/' inputfile
heres an... (8 Replies)
Discussion started by: blt123
8 Replies
10. Shell Programming and Scripting
Hi All,
I need order file some, e.g.
$cat file
data description importantainfo
121 desp1 info1
122 desp2 info21
2342 desp3 info32
5345 desp4 info43
the how can make file
but out formating
$cat file (adjunt image)
thank you (2 Replies)
Discussion started by: aav1307
2 Replies
LEARN ABOUT DEBIAN
schroot-script-config
SCHROOT-SCRIPT-CONFIG(5) Debian sbuild SCHROOT-SCRIPT-CONFIG(5)
NAME
schroot-script-config - schroot chroot setup script configuration
DESCRIPTION
schroot uses scripts to set up and then clean up the chroot environment. These scripts may be customised using the script-config key in
/etc/schroot/schroot.conf. This key specifies a file which the setup scripts will source when they are run. The file is a Bourne shell
script, and in consequence may contain any valid shell code, in addition to simple variable assignments. This will, for example, allow be-
haviour to be customised according to the specific chroot type or name.
This file is deprecated, but is still used if present; it will be obsoleted and removed in a future release. All the settings in this file
are now settable using configuration keys in schroot.conf, as detailed below. Existing configuration should be modified to use these keys
in place of this file.
ENVIRONMENT
The environment is the same as for all setup scripts, described in schroot-setup(5).
VARIABLES
The following variables may be set to configure setup script behaviour. Note that new variables may be added in future releases. Third-
party extensions to schroot which add their own setup scripts may add additional variables which are not documented here; consult the
extension documentation for further details.
SETUP_COPYFILES
A file containing a list of files to copy into the chroot (one file per line). The file will have the same absolute location inside
the chroot. Note that this is settable using the setup.copyfiles key.
SETUP_FSTAB
The filesystem table file to be used to mount filesystems within the chroot. The format of this file is the same as for /etc/fstab,
documented in fstab(5). The only difference is that the mountpoint path fs_dir is relative to the chroot, rather than the root.
Note that this is settable using the setup.fstab key. Also note that mountpoints are canonicalised on the host, which will ensure
that absolute symlinks point inside the chroot, but complex paths containing multiple symlinks may be resolved incorrectly; it is
advised to not use nested symlinks as mountpoints.
SETUP_NSSDATABASES
A file listing the system databases to copy into the chroot. The default databases are 'passwd', 'shadow', 'group', 'services',
'protocols', 'networks', and 'hosts'. 'gshadow' is not yet copied by default, due to not being supported by all but the most recent
version of the GNU C library. The databases are copied using getent(1) so all database sources listed in /etc/nsswitch.conf will be
used for each database. Note that this is settable using the setup.nssdatabases key.
AUTHORS
Roger Leigh.
COPYRIGHT
Copyright (C) 2005-2012 Roger Leigh <rleigh@debian.org>
schroot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option) any later version.
SEE ALSO
sbuild(1), schroot(1), sh(1), schroot.conf(5), schroot-setup(5).
Version 1.6.4 27 Oct 2012 SCHROOT-SCRIPT-CONFIG(5)