10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello -
I was looking to write a simple script trying to rename sub-directories chopping off the last n characters.
For example:
In /home/myname/dir there are three sub-directories: directory1_1, directory2_2, and directory3_3.
Is there a simple script to chop off the last... (4 Replies)
Discussion started by: twckfa16
4 Replies
2. UNIX for Dummies Questions & Answers
I found a closed thread that helped quite a bit. I tried adding the URL, but I can't because I don't have enough points... ?
Modifying the syntax to remove ! ~
find . -type f -name '*~\!]*' |
while IFS= read -r; do
mv -- "$REPLY" "${REPLY//~\!]}";
done
These messages are... (2 Replies)
Discussion started by: rabidphilbrick
2 Replies
3. Shell Programming and Scripting
I'm trying to move a large folder to an external drive but some files have these weird chars that the external drive won't accept.
Does anyone know any command of any bash script that will look through a given folder and remove any weird chars? (4 Replies)
Discussion started by: Joktaa
4 Replies
4. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
5. UNIX for Dummies Questions & Answers
I have this piece of code
printf '%s\n' $pth*.msf | tr ' ' '\n' | sort -t '-' -k7 -k6r \
| awk -F- '{c=($6$7!=p&&FNR!=1)?ORS:"";p=$6$7}{printf("%c%s\n",c,$0)}'
When I run it I get
/home/chrisd/tatsh/branches/terr0.50/darwin/n02-z30-dsr65-terr0.50-dc0.002-8x6drw-csq.msf... (8 Replies)
Discussion started by: kristinu
8 Replies
6. UNIX for Dummies Questions & Answers
I am trying to loop through folders and extract the name of the lowest level subfolder
I was running the script below, it returns
/bb/bin/prd/newyork
/bb/bin/prd/london
/bb/bin/prd/tokyo
I really want
newyork
london
tokyo
I couldn't find a standard variable for the lowest level... (1 Reply)
Discussion started by: personalt
1 Replies
7. Shell Programming and Scripting
Hi All,
I have some 50,000 HTML files in a directory. The problem is; some HTML files are duplicate versions that is wget crawled them two times and gave them file names by appending 1, 2, 3 etc after each crawl. For example, if the file index.html has been crawled several times, it has been... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
8. Red Hat
Hello,
when i start to take backup following error generate please share solution for this problem i am very thankful to you.
$ tar -czvf orahome.tar.gz /testhome/TEST/PROD/orahome/
tar: Removing leading `/' from member names
O.S 4.5 Red Hat
Thanks,
Umair (1 Reply)
Discussion started by: umair
1 Replies
9. UNIX for Dummies Questions & Answers
hai,
I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc".
(here "oasitqtc" is the owner of the directory or sub directory.)
i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies
10. Shell Programming and Scripting
Hi,
I have searched the forum on how to mass replace the file names. We are doing the migration and I am trying to accomplish a task where I have to replace all UNIX scripts in a particular directory that start with bdw to fdm...
For example: bdw0110137.sh should be fdm0110137.sh
Keep the... (4 Replies)
Discussion started by: madhunk
4 Replies