10 More Discussions You Might Find Interesting
1. Linux
Hi,
I am trying to run a command that finds all files over x amount of days, issue is one of the directories has spaces within it.
find /files/target directory/*/* -type f -mtime +60 When running the above the usual error message is thrown back
+ find '/files/target\' 'directory/*/*' -type... (1 Reply)
Discussion started by: Ads89
1 Replies
2. Shell Programming and Scripting
Hi I want to know how to handle the spaces in the below scenario.
I have a file (CON_zip_path_1.txt) which has some directory paths with spaces in directory names . My requirement is to unzip these zip files to
another path. Please see the code below and the error.
CON_zip_path_1.txt... (4 Replies)
Discussion started by: paul1234
4 Replies
3. Shell Programming and Scripting
I am using the below bash loop:
or f in /media/cmccabe/My Book Western Digital/10_29and30_2015/*.bam ; do
bname=`basename $f`
pref=${bname%%.bam}
samtools view -H $f | sed '/^@PG/d' | samtools reheader - $f > /home/cmccabe/Desktop/NGS/${pref}_newheader.bam
done
is the... (1 Reply)
Discussion started by: cmccabe
1 Replies
4. Ubuntu
Hi, I'm new to this... but I am unable to see /etc, however I can access it via gknautilus... but as superuser I'm getting told no such file or directory via terminal (15 Replies)
Discussion started by: GaryW
15 Replies
5. Shell Programming and Scripting
I am writing a shell script to cd to a folder.
folder name is "October Scripts"
I am currently storing the name of folder in a shell variable as so path="October\ Scripts/".
If I do cd $path I receive the error bash: cd: October\: No such file or directory
What am I doing wrong?
Kindly... (3 Replies)
Discussion started by: anand2308
3 Replies
6. Shell Programming and Scripting
Hi everyone,
I have been a big fan here since a couple years (since I started being an admin ...) and finally decided to become a member and help ppl and perhaps being helped
Now I have a problem that might interest some of the gurus.
I am abig fan of what I call "one liners". I am trying... (2 Replies)
Discussion started by: plmachiavel
2 Replies
7. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a requirement.
cat /usdd/Sample/"NDDF Plus DB"/"NDDF Descriptive and Pricing"/"NDDF BASICS 3.0"/"Pricing"/1.txt |
sed 's/*|*/|/g' |
sed 's/^*//'|
sed 's/^*//;
s/*$//' > temp.txt
In unix prompt the above command is reading the file 1.txt and I am... (1 Reply)
Discussion started by: prabhutkl
1 Replies
8. 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
9. UNIX for Advanced & Expert Users
Ok, I think it would be wise to begin with the scenario.
I've got a server that has a template directory structure containing 7 folders. Some folders will need permissions set one way, and other set another way. That's the easy part using:
chmod -R 755 * ;This used first to... (2 Replies)
Discussion started by: Junk_box9
2 Replies
10. Shell Programming and Scripting
The script below was written to select files and convert a particular string to something other and replace that file. However, I came across some issues with filenames that contain spaces, any suggestions to get around this? Any other suggestions that may apply to this code would also be... (5 Replies)
Discussion started by: Shakey21
5 Replies