10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to cat two files with similar names. I am using the following script:
#!/bin/bash
if ]
then
file=$1
file2="${file%R1.fastq}R2.fastq"
echo fetching data from R2 file ...
sleep 3
cat $file $file2 > infile
else
echo "Input_file passed... (2 Replies)
Discussion started by: Xterra
2 Replies
2. Shell Programming and Scripting
Hi,
I tried below method;
mv -v /oracle1/scr/tilki/willsendtilkiNew/VOICE-MO_$nfname.gz \
$(echo /oracle1/scr/tilki/willsendtilkiNew/VOICE-MO_$nfname.gz | tr 'dat' 'txt');
nfame variable has the string "dat" .
I need to rename files like below;
ASIS: 20140902103700_100319.dat.gz... (8 Replies)
Discussion started by: snr_silencer
8 Replies
3. UNIX for Dummies Questions & Answers
Hi guys!
I have quite a lot of files like
all_10001_ct1212307460308.alf*
and I want to get rid of the first number for all at once like:
all_ct1212307460308.alf*
How can I do this in the shell? (12 Replies)
Discussion started by: TimmyTiz
12 Replies
4. UNIX for Dummies Questions & Answers
Hi
I'm trying to remove what I "think" is a bad character. How I got the bad character is when I downloaded jpgs onto my PC and then renamed the files using windows explorer. In cygwin, the files look like
$ dir -l
total 7840
----------+ 1 None 3647968 Jul 21 08:41 2012-07-21\ (1).JPG... (6 Replies)
Discussion started by: SailingDreams
6 Replies
5. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
6. Shell Programming and Scripting
Hi;
In following code
find LOG_DIR -type f | while read filename; do echo $filename; done
I want to precede each white space encountered in filename with \ so that when i use $filename for running some commands in do...done,it wont give me an error.
will appreciate ur help in this.... (1 Reply)
Discussion started by: ajaypadvi
1 Replies
7. Linux
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I have a set of files named S5_SK1.chr01 S5_SK1.chr02 S5_SK1.chr03 ..... and the first line of these files is >SK1.chr01 >SK1.chr02 >SK1.chr03 ..... Can anyone suggest how I can change the first line of all these files with the filename itself? So my expected output for the first lines of... (14 Replies)
Discussion started by: pawannoel
14 Replies
9. UNIX for Dummies Questions & Answers
Dear all,
I have a file like below. I want to replace all the '.' in the 3rd column with 'NA'. I don't know how to do that. Anyone has an iead? Thanks a lot!
8 70003200 21.6206
9 70005700 17.5064
10 70002200 .
11 70005100 19.1001
17 70008000 16.1970
32 70012400 26.3465
33... (9 Replies)
Discussion started by: forevertl
9 Replies
10. Shell Programming and Scripting
I have following set of dirs:
/dir1/dir2/subdir1
file1
file2
/dir1/dir3/subdir1
file4
file5
/dir1/dir4/subdir1
file6
file7
All of these files have a common string in them say "STRING1", How can I... (3 Replies)
Discussion started by: Hangman2
3 Replies