10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
As part of a bash the below line strips off a numerical prefix from directory 1 to search for in directory 2.
for file in /home/cmccabe/Desktop/comparison/missing/*.txt
do
file1=${file##*/} # Strip off directory
getprefix=${file1%%_*.txt}
... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
The task is to create a script that would reproduce the output of 'du' command, but in a different way: what 'du' does is:
<size> <folder name>and what is needed is
<folder name> <size>We need to show only 10 folders which are the... (3 Replies)
Discussion started by: UncleIS
3 Replies
3. Shell Programming and Scripting
Good day, everyone!
I'm very new to bash scripting. Our teacher gave us a task to create a script that basically does the same job the 'du' command does, with the difference that 'du' command gives an output in the form of
<size> <folder name>and what we need is
<folder name> <size>As for... (1 Reply)
Discussion started by: UncleIS
1 Replies
4. Shell Programming and Scripting
I'm currently working on a script that extracts files from a .zip, runs an sha1sum against them and then uses awk to pre-format them into zomething more readable thusly:
Z 69 89e013b0d8aa2f9a79fcec4f2d71c6a469222c07 File1
Z 69 6c3aea28ce22b495e68e022a1578204a9de908ed File2
Z 69... (5 Replies)
Discussion started by: Ethereal
5 Replies
5. Shell Programming and Scripting
hello all
in my bash script I have a file and I only want to keep the lines that appear twice in the file.Is there a way to do this?
thanks in advance! (4 Replies)
Discussion started by: vlm
4 Replies
6. Shell Programming and Scripting
Hi, here comes another newbie question:
How to find the number of non-duplicate names recursively?
For example, my files are stored in the folders like:
If I do
find . -depth -name "*.txt" | wc -l
This will gives out a result "4". One .txt file named "1.txt" in folder "1",
and... (2 Replies)
Discussion started by: jiapei100
2 Replies
7. Shell Programming and Scripting
Hello everyone !
Please have a minute and see if you know how to script this
I have a file like this:
"create table ....
...
create index n112 on ...
...
create table ...
....
create index n113 on...
...
create table ...
create index n112 on ...! duplicate
... (1 Reply)
Discussion started by: sotoc79
1 Replies
8. UNIX for Dummies Questions & Answers
I have a file that looks like this
2 4 10 500 tim9
5 8 14 700 tim9
3 5 15 432 john1
1 4 12 999 ellen2
So basically what i want to do is fine duplicate names on column 5 and rename it with an extention (i.e. tim9_1 and tim9_2).
so the output file will look like this
2 4 10 500 tim9_1... (1 Reply)
Discussion started by: kylle345
1 Replies
9. Shell Programming and Scripting
Thanks
AVKlinux (6 Replies)
Discussion started by: avklinux
6 Replies
10. UNIX for Advanced & Expert Users
Hi, I have a accentuated letter (ö) in a script for an Installer. It's a file name. This is not working and I'm told to try using the octal value for the extended ascii character. Does anyone no how to do this? If I had the word "filförval", can I just put in the value between the letters, like... (9 Replies)
Discussion started by: peli
9 Replies