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

General :: What File System To Choose

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

Debian :: Choose Keyboard Model In Gnome Shell?

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

General :: Read .gz File Direct On Shell/terminal Without Decompressing The File?

Dec 9, 2008

How can I read .gz file direct on shell/terminal without decompressing the file?
satimis

View 5 Replies View Related

General :: Shell Script That Adds Users Name To A File When The File Is Modified?

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

General :: Convert Binary File In To Ascii File Using Shell Script?

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

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

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

Ubuntu :: How To Choose Winrar Prompt To Choose Action

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

Software :: What Emac File Do Choose For Launcher?

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

Ubuntu Multimedia :: Can't Choose File Order On CD Burning?

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

Programming :: PHP - List Directory - Choose A File - Change Its Name

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

Ubuntu :: Choose Nautilus File Manager Header Format?

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

General :: Shell: Script On Each Line In A File

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

General :: Quickest Way To Share File From Shell

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

General :: Shell Scripting - For Each File In Directory

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

General :: Convert DOS Bat File To Shell Script?

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

General :: Insert Texts In A File By Using Shell?

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

General :: Ovewrite A File In Shell Script?

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

General :: Shell Command To Display Contents Of A File?

Feb 23, 2010

shell command to display contents of a file? Like that of .txt or .html

View 9 Replies View Related

General :: Get The Shortest String In A Text File With Shell?

Apr 29, 2010

Assume I have a text file as belowabcdaaaaaaagfgkhahahahahahhahhgfThen gf would be returned

View 4 Replies View Related

General :: Find The Tag Value In Xml File Through Unix Shell Script?

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

General :: How To Look At History File In Unix Shell For User?

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

General :: Can't Source File By Shell Script In Ubuntu 10.04

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

General :: How To Modify Line Of File Using Shell Script?

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

General :: Pass File Content Through URL Using Shell Script?

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

General :: Need To Convert Batch File To Shell Script

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

General :: Shell Script For Appending Data To A File?

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

General :: Shell Script That Reads From Parameters File?

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

General :: Shell Script To Find A File Size?

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

General :: Shell Scripting Text File Creation ?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved