10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please help, I want to join multiple files based on column 1, and put the missing values as 0. Also the colname in the output should say which file the values came from.
FILE1
1 11
2 12
3 13
FILE2
2 22
3 23
4 24
FILE3
1 31
3 33
4 34
FILE1 FILE2 FILE3
1 11 0 31 (1 Reply)
Discussion started by: newbie83
1 Replies
2. Shell Programming and Scripting
Hi,
We have a folder that has files in the following structure
abc.sql
def.sql
efg.sql
.
.
.
xyz.sql
I have to find a certain string (say "test") in each file and replace it with the name of the file. For eg. if "test" is present in abc.sql, I want to replace it with "test abc". If... (8 Replies)
Discussion started by: jerome_rajan
8 Replies
3. Shell Programming and Scripting
How to rename multiple files by replacing the white spaces with underscore
for ex:
293TrexFH\ \ \ GSM855007RINGB_lhb11_binary.txt
293TrexFH\ \ \ GSM855007RINGB_lhb12_binary.txt
293TrexFH\ \ \ GSM855007RINGB_lhb13_binary.txt
293TrexFH_GSM855007RINGB_lhb11_binary.txt... (1 Reply)
Discussion started by: quincyjones
1 Replies
4. Shell Programming and Scripting
Hi,
I have files with filenames as below.
SGM Daily Sales Email-en-us-05312012.xlwa
I want to rename it in .xls. I am writing a script to change this, as there can be multiple files in subfolders.
I have the following script.
#!/bin/ksh
for oldfile in $(find... (1 Reply)
Discussion started by: mac4rfree
1 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I've been tangoing with this one for a couple of days now and I'm still not making any progress.
Basically I'm trying to match three numbers in a string from a text file with matching numbers in a jpeg, and then copying the results to another folder.
Data looks like this:
Model:... (4 Replies)
Discussion started by: faceonline
4 Replies
6. Shell Programming and Scripting
I need to insert <filename + comma> into each line of multiple files.
Any idea how to script that?
Regards,
Manu (5 Replies)
Discussion started by: linux.yahoo
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies
8. Shell Programming and Scripting
I have a text file containing files in a directory structure i.e.
/project/hr/raw/jcpdatav/datav_aug03
/project/hr/raw/jcpdatav/comb8121sep02n
/project/hr/raw/jcpdatav/datav_feb04_ons
/project/hr/raw/jcpdatav/corpsick_jun06
/project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
Discussion started by: mr_crosby
3 Replies
9. Shell Programming and Scripting
Hi
I am having difficulty copying files from one dir to another due to a space in the names of the file with an extension .rtf
There are a group of files and the command am using is
cp `ls -rt /wlblive/home/whiops/ops/RTFs/*.rtf|head -20` /wlblive/home/jamshed
Since the files are... (3 Replies)
Discussion started by: jamshedj
3 Replies
10. Shell Programming and Scripting
Hello,
When I run following script
#!/bin/bash
cd ~/directory1
mv `ls -trF | grep -v / | tail -10 ` ~/directory2
works fine with filenames not having any space but runs into issues with filenames that have spaces tried with $file variable still doesnot work. Can someone help me (4 Replies)
Discussion started by: asakhare
4 Replies