General :: (Shell Script) Choose Log File To Use
May 9, 2011
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.
View 5 Replies
ADVERTISEMENT
Jul 12, 2010
I'm still to install Linux (waiting for a replacement of a bad DIMM) on my new box. It will probably be CentOS, following 'Rubberman's recommendation in forum/coffee-lounge/166195-distro-recommendation-development-use.html .
I assume (as I haven't installed Linux before) there could be a choice of file systems. Is there any recommendation on what I should/could use ?
View 9 Replies
View Related
Jul 24, 2011
I've recently upgraded my squeeze to sid, then installed gnome shell as default window manager.
1. Gnome shell was normal until yesterday, I upgraded new packages up to date, then I cannot log into gnome shell any more (however, fallback mode is normal). It shows a sad computer screen with message "Oh no, something has gone wrong". The only thing I can do is pressing the logout button to log out.
2. Debian is running on my thinkpad T60p, and I can choose keyboard model in Gnome2, but I can't find any options in the system setting in Gnome shell to change keyboard layout for model IBM T60/R60.
View 3 Replies
View Related
Dec 9, 2008
How can I read .gz file direct on shell/terminal without decompressing the file?
satimis
View 5 Replies
View Related
Mar 30, 2010
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.
View 1 Replies
View Related
May 23, 2011
i am trying to convert a binary file in to ASCII using shell script. this file contains multiple types of data like string, number, bcd, etc.
View 5 Replies
View Related
May 11, 2011
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?
something like: -printfunction -printername < file*
View 7 Replies
View Related
Feb 16, 2010
I was extraction some file through command line then I encounter on notification from winrar. This file exist what u want to do
replace
never
quite
I don't want that winrar will prompt me to choose action. Everytime whenever this situation occur it will overwrite / skip that file
Syntax I am using for unrar
rar e -pmypassword filename
View 8 Replies
View Related
Oct 18, 2010
emac is new to me and I want to create a panel launcher ie. icon shortcut but there are 4 choices and I don't know the difference in function or usage between them: emacs, emacs-23.2-no-x11, emacs-23.2-with-x11, emacsclient.I want to learn how to use emacs so which one of these versions do i choose?
View 11 Replies
View Related
Mar 18, 2010
I want to do is this: choose the order (other than alphabetical) of the files that I burn to a disc.Brasero doesn't allow it K3b doesn't allow it GnomeBaker doesn't allow it Unless I am missing something, I can't figure out any way other than renaming all my files with a single number and/or letter at the beginning of a file name to choose the order of files. This blows my mind it seems like the most "no duh" feature that everyone would need in any Cd burning program. if I am stupid or if the software developers are stupid. (because I really can't see any other options) This is seriously so important (to me), that I will abandon Linux and go back to Windows if I can't do it.
View 9 Replies
View Related
Mar 16, 2011
Im looking to use PHP to list a directory. When I click on a filename, I'd like it to automatically remove the first 16 characters off of the filename and save it to the filesystem.
View 6 Replies
View Related
Oct 31, 2010
Last night I had to re-install Ubuntu. Previously, the header of the file manager had been configured up with the three buttons on the right for icon/list/compact view (see 1st image below), whilst since re-installing, they appear with the drop-down menu instead (as per the 2nd image). How do you change between these two formats? My preference is for the first of these.
View 2 Replies
View Related
Jan 3, 2011
So if I have a file with a list of files:
file.txt
file1.a
file2.b
file3.c
and I wanted to perform a script using a loop or recursively on each of those files, is there any way that I could do this?
I saw that xargs might be able to help me.
Here is sorta what I want to do:
Code:
#!/bin/bash
cat file.txt | xargs?? # Some commands to turn each line into a variable
for var in ${@}; do # Some way to get each of the files
# script on each file
View 1 Replies
View Related
Jul 30, 2010
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.
View 2 Replies
View Related
May 2, 2011
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?
View 11 Replies
View Related
Jun 21, 2010
I need to convert the following .bat file to a linux shell script.experienced and kind linux folks:
:: Import database schema
echo off
echo.
[code]....
View 2 Replies
View Related
Jan 26, 2011
I'm using fedora 14...i would like to insert few texts to a file in shell prompt(may be useful in scripting for in the future)...for eg,
[root@ruby ~]# cat > hello
1
2
2
[code]....
so in the above file i need to add the line "new line added" near the number 4 in the above file ....how can be this done ...?
View 8 Replies
View Related
Dec 12, 2010
I want to overite a file using shell script.
i need to overite the file withe value of 2nd argument.
echo $2 > /home/dir/file.txt whether this will work? or what is the correct syntax?
View 2 Replies
View Related
Feb 23, 2010
shell command to display contents of a file? Like that of .txt or .html
View 9 Replies
View Related
Apr 29, 2010
Assume I have a text file as belowabcdaaaaaaagfgkhahahahahahhahhgfThen gf would be returned
View 4 Replies
View Related
Nov 3, 2010
the below tag is in the xml file. Now i want to find and extract the value of application name test1 and test2 one by one in the unix shell script. how to do this
<application name="test1">
</application>
<application name="test2">
[code]...
View 2 Replies
View Related
May 28, 2010
How to Look at history file in unix shell for a user, find 5 most often used commands.
View 5 Replies
View Related
Jul 30, 2010
When I try to execute my script its getting error
.........................................
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.
**************************************************
SCRIPT_HOME=/home/dhanushka/project/mChoise_Recharge/scripts/scriptfw
TAPE_DRV=/dev/st0
[code]....
View 4 Replies
View Related
Apr 12, 2010
I have a file like below
n
p
1
1
50
w
I need to modify the first occurence of 1 byt some other integer.How do i do it using shell script?Can anybode help me out with that?
View 9 Replies
View Related
Jul 16, 2011
I am calling a URL from shell script and passing few argumants,Here i have to pass file content as one argument.How can i pass file content through URL.
eg:
content=`cat /Users/test1.txt`
open http://localhost:8080?filecontent=$content
[code],...
View 1 Replies
View Related
May 3, 2010
Kindly help me converting a batch file with following commands into shell script..I would like to have the same functionality with shell commands.
View 2 Replies
View Related
Feb 8, 2011
this is how we append a file at command line its like
cat>>file.txt
adasds
^D
but how to write the code for appending a file in a shell script i tried but its not running
cho "the contents of the file before appending"
cat ab.txt
echo `cat >> ab.txt
[code]....
View 3 Replies
View Related
Nov 3, 2009
what I am trying to do but I am not sure exactly how to do it. I want to write a shell script that will replace certain values in a file with environment specific information that it pulls from a parameters file. The paramaters file looks like the following...
[dev]
ip=10.15.109.41
name=dev1.mydomain.com
[code]...
View 4 Replies
View Related
Jul 20, 2010
am trying to write a shell script to find the size of a particular log file and if the log size grows, script should mail the changes to the administrator or a any user so script should monitor the log file continuously in a time interval, how can i do that?
I tried with these codes to find the file size but it throws me error says command not found
$s=$( stat -c %s mylogfile.log)
echo $s
View 10 Replies
View Related
Feb 16, 2011
I'm just starting out with shell-scripting, but having a problem with making new text files with the touch or cat > commands.
What I've been doing is touch testfile1.txt
Also, I've tried cat > testfile1.txt (text)
Console reports "bash: text1.txt: No such file or directory. Consfusingly, it works fine in the home-directory. But if I move the file to where I want it, I can no longer view, edit, etc. it.
View 1 Replies
View Related