General :: Change A Specific Characters To Capital In A Specific Text?

Dec 2, 2010

for example

else {
for fileDOC in $location/*.doc
do

[code]...

View 12 Replies


ADVERTISEMENT

Programming :: Change To Capital First Letter Of Every Word Over Specific Column

May 1, 2010

Trying to change to upper case first letter of every word over a specific column.

View 10 Replies View Related

General :: Bash Script To Parse A File To Get A Set Of Line Between A Specific Characters?

Dec 23, 2010

I have a log file that contains information like this:

----------------------------
r11141 | prasath-palani | 2010-12-23 16:21:24 +0530 (Thu, 23 Dec 2010) | 1 line
Changed paths:
M /projects/
M /projects/

[code]....

what i need is, i need to copy the data given between the "---" to seperate files, for, e.g. the first set of data between the "---" should be in one file and another set of data in another file.

View 5 Replies View Related

General :: Show Specific Lines In A Text File?

Feb 3, 2011

I have created a text file in Linux, and I only want to show certain users. Here is my text file:

usr user tty Limbo?
11 12:06:13 APW no
12 12:06:13 APW no

[code]...

View 12 Replies View Related

General :: Sed - Replacing Only Text With Several Specific Lines Excluded

Jun 17, 2010

As much as I didn't want to ask a sed question, especially considering there's already one on this page I've looked as best I could and cant find the solution. Id like to use sed to replace occurrences of a pattern but exclude two or 3 specific lines that are not consecutive. For example I know with 1,10 i could exclude the first 10 lines, what is the syntax if I just wanted to exclude line 3 and 7. The sed command I'm working with right now is for rearranging Ethernets.

cat /etc/udev/rules.d/70-persistent-net.rules | sed -e '/'"$found1fullmac"'/!s/eth1/'"found1eth"'/' > /etc/udev/rules.d/70-persistent-net.rules

I would like to replace $found1fullmac with two variables representing line numbers to exclude from the replacement.

View 6 Replies View Related

General :: Recursive Search For Files That Hold Some Specific Text?

Jan 18, 2011

How do I recursively generate a text file which has a list of all files on my server which contain a specific string anywhere in the files?

I know the following command can be used to replace a string recursively

find /var/www -type f -print0 | xargs -0 sed -i 's/old string/new string/g'

I do not want to replace the string, I just want a list of all files which contain the string.

View 4 Replies View Related

General :: Searching A Specific Directory For Files Containing A Text String?

Nov 20, 2010

I am a member of a group which has written a program whose source code is being held in a specific directory (~cs252/Assignments/basicAsst/project) and we want to go through and change the parameters for the function "sequentialInsert." My job is to find all occurances of the function call to "sequentialInsert" and to also list the files from where the code came from. Also, I have to be in the commandsAsst directory when I do this. I have tried grep and find combined together, and I am at a lost.

View 1 Replies View Related

Programming :: Replacing Set Of Characters In A Specific Line Using Sed Or Awk?

Dec 29, 2010

I would like to replace 'xxxx' with 'yyyy' which is in a file xyz.csproj not sure of what 'xxxx' is, it can be 3055, 4056, 7089 etc. I know it always appears at line # 5 and at character 50.

<Reference Include="System.Management" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Windows.Forms" />

[code]....

View 14 Replies View Related

Ubuntu :: Giving A Specific User Permission To Start/stop A Specific Service?

Jun 8, 2010

How do I give permission to a logged in user to stop/start a specific service without entering a root/sudo password? So they can do a simple "service SomeService stop|start" It is for a headless Ubuntu server.

View 5 Replies View Related

Programming :: Search A Bunch Of Files In A Specific Folder For A Specific Number?

Jul 24, 2010

I need to search a bunch of files in a specific folder for a specific number and add all the numbers together to a total sum. I use Rsync everyday, everytime I run rsync i get a logfile (rsync output) witch contains the textstring "Total bytes sent: xxxxxx".

The "xxxxx" can vary in lenght. I need to extract the "xxxxxx" from each file and add the numbers together to a total size over a week or a month. Is this possible? And I wish to only use bash. One way of doing stuff at a time my friends .

View 5 Replies View Related

Ubuntu :: Allow A Specific User To Mount Or Remount A Specific Partition?

Jun 9, 2010

my system I want user1 and only user1 to be able to mount and unmount a specific partition, this partition contains backups and is usually mounted read only, needs to be temporarily mounted read/write by user1 while doing the backup.user1 is an unprivileged user. I've read that the user option will let any user mount the file-system (and only that user can then subsequently unmount it) and that the users option allows any user to mount or unmount the file-system.I also found this in mount's man pageQuote:The owner option is similar to the user option, with the restriction that the user must be the owner of the special file. This may be useful e.g. for /dev/fd if a login script makes the console user owner of this device. The group option is similar, with the restriction that the user must be member of the group of the special file.So it looks like I'd need a login script for that user to make the user owner of the device file (/dev/voiceserv/backup in this case)

View 7 Replies View Related

Server :: Sendmail: Block Specific Sender To Specific Recipient?

Oct 1, 2009

I'm trying to configure our mail server to block email from a specific sender reaching a specific recipient. In other words, if one of our employees is getting harassed by a 'stalker', how would one go about blocking, at the MTA (Sendmail) level, a specific sender email address from reaching a particular users inbox? We do not want to capture the email - simply block it before it consumes server resources.The Sendmail server (MTA) is a front end to our Exchange server so no user accounts exist on the Linux server. We simply use it as a SPAM and Virus scanner then forward clean email to the Exchange server.

View 6 Replies View Related

General :: Run A Program For A Specific Amount Of Time Starting At A Specific Time?

May 18, 2010

I want to record an internet radio station starting at 2:00am tomorrow morning. The specific program on the radio station lasts until 6:00am. The command I need to run to record the station is: Code:mplayer http://wjcu.jcu.edu:8001/listen.pls -ao pcm:file=indie_heat_of_the_night.wav -vc dummy -vo nullI'd use cron, but 1. I'm not sure how to and 2. it seems unnecessarily complicated for something that I only want to run once. If cron is the only/easiest solution, I guess I'll just have to resort to that, but I'd rather not.

View 12 Replies View Related

Programming :: Replace Specific Character After Specific Line By Awk?

Jul 19, 2010

I want to replace specific character in a file after every specific line. example as follows.

O 000000000000000000
A 111111111111111111
C 222222222222222222

[code]...

View 2 Replies View Related

Server :: Redirect Specific Ip To Specific Web Page?

Jul 1, 2009

I configure squid to work with squidGuard , and all thing work properly , but there is problemfirst look to this squidGuard.confdhhome /usr/local/squidGuard/dblogdir /usr/local/squidGuard/log

src blacklist {
ip 10.0.0.5
}

[code]...

View 1 Replies View Related

Ubuntu :: Looking For Specific Text Editor

Jul 20, 2010

You know how nano, vi, vim, etc... all use the entire screen when they are started? I am wondering if it is possible to get a text editor (or modifying an existing one) that doesn't take the entire terminal. The reason for this is that I to look at the output of a different command, then modify a different file while looking at the output. I want to be able to do this very fast, and it would be great if there was some way I could this all in one shell instead of creating two terminals and resizing or flipping between them. I realize the ideal solution would be a second monitor, but I can't get that right now.

View 6 Replies View Related

Software :: Remove Specific Text Blocks In A File?

Jul 1, 2010

I have a text file (actually a log file from a sensor) that looks like this:

Date/Time: 10.07.01 11:03:59
00 Battery Voltage 13.5 Volt
01 Reference 71
02 Wind speed 6.68 m/s
03 Wind gust 9.3 m/s

[Code]....

I want to delete every block that is not complete. If any of the above lines (Date line or lines 00 to 08)is missing I want to completely remove the block.

View 1 Replies View Related

Programming :: Get The Specific Text From A Txt File In Bash Script?

Apr 30, 2010

I have a text file which stores the list of files & dir, I want to get only file's extensions from this file & want to store it in another file.eg, below is the file's contents & from it I want to get the extensions sh, pl & h & want to store it in another file. Also I don't want directory list.

A scripts/services_restarter.sh
A scripts/svn post_commit scripts
A scripts/tmp/

[code]...

View 8 Replies View Related

Programming :: Specific Tools Or Jsut A Text Editor?

Feb 20, 2011

i have never tryed programming anyhing. i was wondering inhow i can start learning python. i use archlinux with openbox. do i need any specific tools or jsut a text editor? sorry for the noob question . from the tutorials online i see many tools like pygtk glade and so on and i cant understand anything

View 11 Replies View Related

Ubuntu :: Filter Specific Text From Source Code With Grep?

Feb 27, 2011

I'm working on a new conky script, and I had the idea to use text from a [URL]... The command I'm using to pull the file is:

Code:
curl -s http://www.thefuckingweather.com/?zipcode=33186 | grep 'ITS FKING *'
However, this gives me the entire line of code this line appears in.
Code:
<br />ITS FKCING NICE</div><div id="remark"><br />
How can I limit this to simply the text?

Sorry about the foul language btw...the words obviously aren't misspelled when I enter them in the terminal

View 5 Replies View Related

Ubuntu :: Bash Script To Delete/replace A Specific String Of Text?

Jun 17, 2010

What i want to do is pretty simple.I want to uncomment every line that begins with "deb" (except for deb cdrom) in /etc/apt/sources.list.I know how to do this through system > administration > software sources.I know I can gksu gedit /etc/apt/sources.list.I'd rather not do it that way.I'd rather have a script do it. It's less work, less typing, less clicking, and would work the same on every ubuntu version.

View 8 Replies View Related

Debian :: How To Change Keys For Just One Specific Application

Aug 14, 2015

I want to remap my keys for a game I'm playing, for example WASD instead of arrows to walk, r, f, c to act like f1, f2, f3 and so on. I'm aware of xmodmap, but I want to do this just for one application and be able to use hotkey to toggle between this script and default setting. I've been trying to use AutoKey, but I cannot force it to work just for specific app. On windows solution is AutoHotKey, but it won't work through wine.

View 0 Replies View Related

OpenSUSE Hardware :: How To Change Resolution To Specific Setting - 11.2

Feb 20, 2010

Is there a way to change my resolution to something specific? I was trying to make my display "less-widescreen" when I accidently made it completely changed.

From the sax2 command, there is only 1400*1050 and 1600*1200, both that are not what I'm looking for and messes up my display. Now, I can't change it back to the original, much less the one I'm looking for (1600*900).

View 9 Replies View Related

Ubuntu :: Change Icon Of Specific File Type

May 25, 2011

I am using Ubuntu 11.04 - the Natty Narwhal with GNOME 2.32.1. I want to change icon of specific file type (like all files having .py or .pl extension). I Google it and have tried all the possible methods but nothing works

View 1 Replies View Related

Programming :: Change The Resource Limits For A Specific Process?

Jun 26, 2010

I want to change the resource limits for a specific processOr to create a new process and give it limits as I want, There is a function setrlimit, Which is possible to change it but for a programmatic I want to apply it to another Process, The problem is that this function does not receive process ID for example. I read in most books on the subject of The Linux system programming

View 1 Replies View Related

Ubuntu :: Gnome3 - Change Automount Options For A Specific Partition?

Sep 1, 2011

I have a specific NTFS partition on a USB drive that I wish to enable execute support for. The only way I've found to do this is to add the partition in /etc/fstab with a umask. This poses some problems:

1. Only root can mount it, making it a pain to mount (open terminal, `sudo mount (path from /etc/fstab)`, enter password, close terminal).
2. The system will hang at start if the UUID is unavailable (or, the external disk is unplugged). I run several servers from my machine, so if I do a remote restart it will not come back up because of the hang.

Is there a way to specify to FUSE (which I believe is the handler for auto-mounting in Nautilus) that this partition should have execute access to files?

View 1 Replies View Related

Ubuntu Servers :: Change The Ownership Of Multiple Files And Directories Under A Specific Subdirectory?

Feb 19, 2010

I have a vary unique problem with file and directory ownership. I need to change the ownership of multiple files and directories under a specific subdirectory.Under this directory structure there are files and directories owned my different users and groups. I need to change all files and directories owned by "user1" to "user2". but if any are owned by "user3" I need those left alone.Is there a simple way to do this or will I need to traverse the structure and change things one at a time.

View 3 Replies View Related

Programming :: Substitute Few Words + Change All The Lines Starting With A Specific Word + Put Blank?

Jan 17, 2009

I have an old-address-list file which is having around 1500 entries. I need to convert this addresses in to a specific format.

The old-address-list file>
# cat old-address-list-file
dn: CN=Muhammad Hadhi K.M,OU=IT Dept,OU=Example Company H.O,DC=example,DC=com
cn: Muhammad Hadhi K.M

[code]....

View 6 Replies View Related

Software :: Check The Contents Of A Text File For A Specific String And Remove It From The File From The Command Prompt?

Oct 14, 2010

I want to be able to check the contents of a text file for a specific string and remove it from the file from the command prompt. I would basically be searching through a number of files and if a specific string is found I would like it removed automatically. pretty much a find and replace, were the replace is nothing. any one got any ideas on how you would do this. I already have the search part sorted just need to be able to remove the string I don't want from the multiple files.

View 4 Replies View Related

Programming :: Text On A Specific Line At The End Of A Line?

Jul 26, 2010

I'm trying to add text to a file for a specific group of users, I'll need to do examples as I can't think of an easy way of explaining, my file is like this:

Code:

users{
user1
user2

[code]....

At the present my code lists all the available groups, how would I add a user to a specified group? (e.g add "members user3") to the end of group 1 for example. So the code ends up like this

Code:

members user2,user3

View 14 Replies View Related







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