03-20-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
Can some one help in appending the file name to all the rows in .csv files the current work is like this.
This is adding a new line for file name,
I need to append file name to all lines in .csv
for i in `ls $filename*.csv`
do
echo "$i" > ./tmpfile
cat "$i" >> ./tmpfile
mv... (3 Replies)
Discussion started by: Satyagiri
3 Replies
2. Shell Programming and Scripting
I would like to append a string at the end of each row of a .dat file.
please give me some advice? Thanks.
e.g.
#content in abc.dat
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
...
#after running the script/command,... (7 Replies)
Discussion started by: Rock
7 Replies
3. Shell Programming and Scripting
I need to delete rows based on the number of lines in a different file, I have a piece of code with me working but when I merge with my C application, it doesnt work.
sed '1,'\"`wc -l < /tmp/fileyyyy`\"'d' /tmp/fileA > /tmp/filexxxx
Can anyone give me an alternate solution for the above (2 Replies)
Discussion started by: Muthuraj K
2 Replies
4. Shell Programming and Scripting
Hi Experts,
I am working on HP-UX. I am new to shell scripting. I would like to have a shell script which will prefix:
1. "H|" before first row of my file and,
2. "T" for all other rows of the file.
For Example - File before running the script 20100430|4123451810|218.50|TC
20100430 ... (4 Replies)
Discussion started by: phani333
4 Replies
5. Shell Programming and Scripting
Assume I have 2 gz files with 2 lines each as below
a.gz
a1,a
a2,a
b.gz
b1,b
b2,b
If I issue
gzip -d -c *.gz
I will get below in the stdout
a1,a
a2,a
b1,b
b2,b
What I need it the filename appended to each row either at the front or back.
a.gz,a1,a
a.gz,a2,a (2 Replies)
Discussion started by: ericlim
2 Replies
6. UNIX for Dummies Questions & Answers
I have 2 files,
file01= 7 columns, row unknown (but few)
file02= 7 columns, row unknown (but many)
now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there
e.g.
file 01
James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies
7. Shell Programming and Scripting
I want to make a script to read row by row and find its length. If the length is less than my required length then i hav to append spaces to that paritucular row. Each row contains special characters, spaces, etc.
For example my file contains ,
12345 abcdef
234 abcde
89012 abcdefgh
... (10 Replies)
Discussion started by: Amrutha24
10 Replies
8. Shell Programming and Scripting
Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file.
Any help would be great
Thanks (6 Replies)
Discussion started by: kylle345
6 Replies
9. UNIX for Beginners Questions & Answers
In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies
10. UNIX for Beginners Questions & Answers
Hi Experts
Need help...
I am looking for a Unix script to append pipe | at the end of all the rows (except header and trailer)in all the files placed under the directory /interfaces/Temp
e.g.
Header
row1
row2
row3
Trailer
The script should read all the files under... (3 Replies)
Discussion started by: phani333
3 Replies
LEARN ABOUT DEBIAN
jigdo-lite
JIGDO-LITE(1) JIGDO-LITE(1)
NAME
jigdo-lite - Download jigdo files using wget
SYNOPSIS
jigdo-lite [ URL ]
DESCRIPTION
See jigdo-file(1) for an introduction to Jigsaw Download.
Given the URL of a `.jigdo' file, jigdo-lite downloads the large file (e.g. a CD image) that has been made available through that URL.
wget(1) is used to download the necessary pieces of administrative data (contained in the `.jigdo' file and a corresponding `.template'
file) as well as the many pieces that the large file is made from. The jigdo-file(1) utility is used to reconstruct the large file from the
pieces.
`.jigdo' files that contain references to Debian mirrors are treated specially: When such a file is recognized, you are asked to select one
mirror out of a list of all Debian mirrors.
If URL is not given on the command line, the script prompts for a location to download the `.jigdo' file from. The following command line
options are recognized:
-h --help
Output short summary of command syntax.
-v --version
Output version number.
--scan FILES
Do not ask for "Files to scan", use this path.
--noask
Do not ask any questions, instead behave as if the user had pressed Return at all prompts. This can be useful when running jigdo-
lite from cron jobs or in other non-interactive environments.
SEE ALSO
jigdo-file(1), jigdo-mirror(1), wget(1) (or `info wget')
CD images for Debian Linux can be downloaded with jigdo <URL:http://www.debian.org/CD/jigdo-cd/>.
AUTHOR
Jigsaw Download <URL:http://atterer.net/jigdo/> was written by Richard Atterer <jigdo atterer.net>, to make downloading of CD ROM images
for the Debian Linux distribution more convenient.
19 May 2006 JIGDO-LITE(1)