General :: Create Folder Name From The Text File?
Jun 23, 2010
1. I need guide on how to create a folder name from the text file with .txt format.
2. First, I call the function of reading the directory.
3. Then, I dont know how to do.
4. Finally, I close the directory
This is my source code in perl
## read text.txt file ##
open F, "from/$directory/text.txt";
read F, $buf, 9999;
close F;[/size]
This source code is used to print the folder with date format like "ddmm" d stands for day and m stands for month
if ($command =~ s/-O "(.*)"/-O "$websites/$month/$file"/)
Instead, I want to have the name from text.txt to be folder name
View 4 Replies
ADVERTISEMENT
Jun 1, 2010
Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.
View 4 Replies
View Related
Sep 14, 2010
I've found these commands in [URL]:
Quote:
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt
But I don't understand these commands, even after reading their manuals.
View 4 Replies
View Related
Feb 13, 2011
this is posable but am trying to do this "Create folder from a filename and move the file into the folder" i have 500000+ file's i need to do with is there a easy way?I really don't want to download them all make/move them with filemonkey just to re-upload them
View 2 Replies
View Related
May 4, 2011
Is possible to make a folder permission like below?
-User can create files/folders in the shared folder.
-But the files/folders they created, cannot be delete/change by em.
(only can be delete by root users)
-Each new files/folders created will auto owner to root only.
View 4 Replies
View Related
Nov 11, 2010
What I plan to do is, create a duplicate file of a text file, and then append some text into the new text file.
View 1 Replies
View Related
Jun 16, 2011
I have a file like:
a
1
2
[code].....
and I would like to convert it to CSV, so that it looks like:
a,1,2
b,1,2
c0,1,2
d0a1,1,2
Basically, I would like to move every 2nd and 3rd line onto the above line, and put a comma to separate
View 5 Replies
View Related
Feb 8, 2010
How to list the contents of a folder to a text file. I'm trying to list all my music, including all subfolders, etc. to a text file, but I can't remember the command.
View 3 Replies
View Related
Apr 13, 2010
I can do multiscan documents using xsane and the scanner and create multipage PDF. My next wonderment was how would you create it so you can search for text in the PDF file. I am assuming the scanner is really just creating an image file. And the reader needs text? I did find a decent OCR web based solution. It looks like it would be a lot of work to put something like that together.
View 4 Replies
View Related
Dec 21, 2010
I have a file with 5000 lines. it is a list of books authors, series and titles. all lines start with the author names, than there is a dash (-) than the series name, a dash again and the title of the book.
The problem I encounter is that sometime there is a series, sometime not, and as I try to enter this list in a database, I wanted to create a cvs file to import into mysql.
ex:
The best would be to be able to add in the second line, a "space dash space" just after the author name, but how to make sure it does not do it to the first line as well.
If I could separate all line with 2 dash, (grep ?) then I would be able to do a simple replace, and change the single dash into two.
View 2 Replies
View Related
Nov 17, 2010
How to create binary file with text in it, something like
Quote:
Hola Mundo!
I want it binary, because I want to execute it directly from Bios before Windows.
View 7 Replies
View Related
May 17, 2010
I want to copy location of every .avi , .jpg file present in a folder or in subfolder present in a direcotry and save in a textfile how to doex : /home/username/Desktop/bookofeli/video/book.aviit should give full locaiton of path how to do
View 2 Replies
View Related
Feb 3, 2010
I am using C. I have a fuction that returns a string
Code:
I need to format this string so that I can create a text file like so:
So I'm trying:
Code:
But I get errors like:
View 2 Replies
View Related
Oct 22, 2009
trying to learn how to write a bash script that will create a new text file named jimbola in my home directory. The file will need to be able to have the first and last name of Jim Bola included in it.
View 4 Replies
View Related
Oct 1, 2009
I am working on a script to convert a comma seperated text file into html code line by line. The text file is like so:
Code:
link url, image url, description and I want it to output this:
Code:
<td><a href=�link url�><img src="image url" alt=�description" /></a></td>
Here is what I have so far:
Code:
#!/bin/bash
var1='<td><a href=
var2='><img src="'
var3='" alt=�thumbnail image" /></a></td>'
[code].....
It puts the entire line into the html so its no good. I'll probably need to use awk (I think).
View 5 Replies
View Related
Feb 18, 2010
I'm installing a tool on Linux system.For this installation, i didn't have the installation document. I got to know that have to create configure file from the bin folder
View 1 Replies
View Related
Jun 3, 2010
When I create on windows a text file in Greek, It doesn't recognize it with Ubuntu... So I created a script:
Code:
#!/bin/bash
fileName="$@"
fileNoExt=$(basename "$fileName")
fileType=$(file "$fileNoExt")
[Code]....
View 1 Replies
View Related
Dec 17, 2010
I need to create a script to count the number of lines from a text file . The output must be put on another text file (no_lines.txt) and in this file i need to generate from the script this output :"File $FILE has $NO_LINES lines ".
View 3 Replies
View Related
Apr 6, 2010
I have a php script that I want to create a file and allow it to be downloaded. I know the dangers of chmodding a directory to 777 so I am trying to avoid this.
What I have done is logged in through ssl as root.
Navigated to the directory where the directory I want to chown is located. I then perform:
chown -R apache directory
View 2 Replies
View Related
Dec 5, 2010
I'm starting bash shell script and I'm looping without any solution.
I'm trying to find some files under a folder hierarchy and in case of errors moving these files to a destination folder under the same hierarchy recreating this hierarchy if not exists.
Finding all ._* files under /src and moving them to /dest recreating folder1 or the others which contains ._* files but without moving files which does not correspond to the pattern.
Code:
I tried find command and I'am getting all needed files
Code:
But I don't know how to use the output to get the parent folder of files which are found to
1- create folder with mkdir -p /dest/folder1 or /dest/folder1/folder4
2- move found files from /src/... to /dest/... with rm command
I'm working on a find command as this trying to do all in the same line but ... little lost
Code:
View 8 Replies
View Related
Apr 28, 2010
How could I replace text in one file with text from another file using sed?
The text in each of the files would be surrounded by a starting and ending delimiter or a starting tag, say like /* */ so to easily find them.
View 8 Replies
View Related
May 18, 2011
Can anyone point me to a well working peace of software (free will be preferred) that can convert text-files into pdf.
View 6 Replies
View Related
May 12, 2011
create a shortcut to my email, so when im loggin in on different homepages,i can just press ex ALT+F1 and my email will be written in the selected area..
View 4 Replies
View Related
Feb 6, 2011
im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.
echo $(ps aux) >>out
The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.
View 5 Replies
View Related
Nov 29, 2010
Build Zip archive, special cases
I'm using zip to archive different files. I need to create a directory in the zip file where to place some of them. Is that possible ?
The syntax I got so far is zip output.zip -r /var/www/test
Inside the zip I want a folder called backup1 and in there the files from /test.
View 2 Replies
View Related
Apr 29, 2011
For example if you want to create an alias in Linux with a message echoed into the variable would the following command be; alias hello="(echo)"Hello." "? I'm trying to learn some environment variables and aliases.
View 4 Replies
View Related
Nov 7, 2010
How can I create shortcut from one ftp folder to another using SFTP client such as WinSCP with Putty?
For example, application path is /home/primary/webapps/appication/
We have created new user with default home directory /home/secondary/
Using Bash command:
setfacl -R -m u:secondary:rwx /home/primary/webapps/appication/
we added full Read-Write permission for secondary user.
To access application folder he suppose to type full path to application folder which is not so convenient for daily usage.
As a solution I would like to create some shortcuts in home directory to this folders as I seen something similar in default cPanel configuration where PUBLIC_HTML folder has some alias such as WWW.
View 1 Replies
View Related
Jun 21, 2010
1. I wanna create a automation script to automatically run the software
2. I wanna create the folder with the format that the filename then date format.
View 8 Replies
View Related
Feb 27, 2011
I would like to create a command in the vim that saves a text document and also compile it. Is it possible?
View 4 Replies
View Related
Mar 8, 2011
Firstly i'd like to introduce myself before I ask my question, i am currently studying a "Network Operating System 2" course, and in the syllabus the professor decided to use Ubuntu Linux for us. This is a first for me and I am truly greatly interested in the OS. It seems like a solid system once you get to know the deep foundations of it. The professor has already given us an assignment, but I feel its not fair as its just a bit too much from out of what he taught us .. He did not teach us what he is asking for. He asked us to create to a text file which lists the Sales from two Salespersons, and each one will have an amount for each month .. So 12 entries for each salesperson.
Using that text file, we should write a bash script which would read the values from the above text file, and produce a "Monthly Sales" text file, which shows the total sales of each month (combined from both the salespersons). I would like to ask for some guidance, some help on how to start. It's just that he didn't teach us any commands about this matter.
View 9 Replies
View Related