Ubuntu :: Install A Tar.gz File With A Shell Script?
Feb 15, 2010
I have to install a program from a tar.gz file. I have extracted it using fileroller, and it contains an installation "shell script" file.
I have no idea what scripts are, or how they work. I tried sudo make/sudo make install, with no luck. how I install this program using the shell script file?
I need a shell script that will add the users name and date to a file when the user has modified the file, these files are within a group and only accessible to this group. But we need a way for people in the group to know who and when the file was last modified.
I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.
Should I be looking to concatenate the files into one file with the file names included, and then print them?
I'm trying to create a script that will back up my databases daily, then keep a weekly version, then keep a monthly version. I know there's a script out there that will make a mysqldump on the first of the month and call that the monthly version, but that doesn't seem right to me. So I was thinking maybe I could put the date +%s in the file name (along with other things like the name of the db, etc) and then do some kind of if statement based off of that date in the file name in order to take the monthly (and weekly) versions.
Ubuntu version 10.10File location inside a folder on DesktopFile extn : .shI need to run this file in terminal console, but what path to be given is the question.
today itself i joined a shell account given to me by cjb.net. i am able to ssh [URL] from my putty... but how can i download files or get help from the this server...
I downloaded the demo of Penumbra Overture, it is a sh file (113Mb). I can't open the file.In a terminal I ran chmod +x PenumbraOvertureDemo-2553sh and then sudo./PenumbraOvertureDemo-2553sh and I get an error "./PenumbraOvertureDemo-2553sh: 2:Syntax error: "(" unexpected" . The quotation marks are my own. Is the file corrupted?ne of my lugmates thinks it might be a shar file, but Karmic says that it is a shell script.Another friend says that it is too large to be a shell script. Here is the code:
johnjohn-laptop:~$ cd /home/john/00 johnjohn-laptop:~/00$ chmod +x PenumbraOvertureDemo-2553sh johnjohn-laptop:~/00$ sudo ./PenumbraOvertureDemo-2553sh
......................................... tape_restore.sh: 40: source: not found tape_restore.sh: 41: source: not found tape_restore.sh: 42: source: not found .................................
But in Redhat I can run same script . My script as follows.
I have a number of text files throughout my /home/pjs/Documents directory tree that have execute permissions set. Almost all of my file names have spaces in them. I am trying to write a shell script that will look at each file in my Documents directory, find the ones that have execute permissions set, and run the command chmod 644. Of course, I don't want the command run on the directories.
The following script *doesn't work*, but might serve to illustrate what I am trying to do:
#!/bin/bash for x in "$(ls -R)" do if [ -f "$x" ] && [ -x $x ]; then chmod 644 "$x" fi done
I want each file and directory name to be placed, one by one, in the variable $x, and then tested with the "if" conditionals.
The first problem seems to be that, although the command "ls -R" does produce a complete list of the files and directories I need, they are not placed, one by one, in the variable x like I want them to be.
Also, I think I should use the shift command so that the option -R doesn't get included as one of the values of the variable $x, but I can't figure out where to put it.
I'm using Ubuntu minimal install (With no window manager). What is the quickest and easiest way to upload a file somewhere? Something like a script to pastebin would work.
I have a small script that uses the find command to look for a log file named: backup_log.txt. And then uses the first value in the log file as a variable in the script later on. However, say there are two or more of these log files located in different directories, how would I let the user choose which log file will be the one to use, and then make that (fullpathtofile) the value of the variable that will be used.
I am working on some homework, however i am not here to be spoon fed. I am trying to get the numerical modification date of each file in a folder. Ie lets say there is a file called bob and it was modified 2006-11-23. i want to get it into a variable as 20061123.
Now i currently have this code:
Code:
However for some reason my output is:
Quote:
See how the 2011 has been placed next to it? i ran it with -x and saw this:
Code:
However i do not know how to find a way around this?
I tried to create logfile for the below shell program but i was not able to get log file,can anyone help me for the below program to create a log file for the shellscript.
I am trying to execute a 4GE file using command something like this "/usr/bin/ksh path of the file with some arguments " ex: /usr/bin/ksh /home/abc.4ge S "./xyz" . I am able to execute the 4GE without this "/usr/bin/ksh" specifying in the command which basically runs in ksh shell itself. But when i try to run it exclusively using the path of the shell it gives me an error something like this "/usr/bin/ksh: /home/abc.4ge: cannot execute". I did check the permissions and all the file has execute permission.
I have 2 external hdd in wich I have all my files.... yesterday, I have copied all the files from hdd1 to hdd2 and I want to eliminate duplicates so I used FSLint to find them, now, I have a txt file that looks like this code...
now I want to make a shell script to delete all the files/entries (read from the log file) that begin with code...
Im using an if statement in the bin ash shell and it isnt working.
Code: if (( 5000 > $available_blocks )) then echo "WARNING Disk space low, "$pct_used" is used" fi
I don't think its a problem with the if. When i use that code it creates a file with name of the value $available_blocks instead of using the '>' sign for comparing the 2 numbers.