General :: Edit An XML From Bash Script?

Feb 25, 2010

I am new to shell script and need to edit an xml form script.
The XML file is something like code...

If the user selects element1, the script should modify only element1 values and not element2 values.
I need it to be done from bash script. I can't use python or perl for the same. Please provide me a way to do so.

View 6 Replies


ADVERTISEMENT

General :: Edit Bash Rc To Tailor Redhat For Cut And Paste?

Apr 4, 2011

Someone edited it - it worked as it should....Where does it live? I am certain there should be a backup.

View 2 Replies View Related

General :: Exit Bash Script - Add - Del - Edit User From Certain File Using Different CASE Variables

Mar 6, 2010

I have made a simple bash script through which i can add, del, edit user from certain file using different CASE variables. like
case
1. adduser
2. del user
3. edit user

Now i want to add a exit CASE like
1. adduser
2. del user
3. edit user
4. exit

Now i want to make a script such a way that, if user input is 4 then only script quit. I used with exit function also but it didn't work. if user press ENTER or other keys then also it quit the program.

View 6 Replies View Related

Programming :: Bash Md5sum Edit With Sed?

Jan 5, 2011

I am trying to get a checksum for a file in a subscripted variable in a bash script. md5sum outputs a checksum and the name of the input file. For example:

Code:
eval CSUM$K=$"(md5sum file)"

This might return something like this:

Code:
3cff5d5c0113959d0be62be34b97e05c file

I want to assign just the checksum to the variable in my shell script and omit the file name that follows. Is there something besides md5sum that will generate a checksum? Or if not, then I was thinking I might be able to extract the checksum without the file name using sed.

View 14 Replies View Related

Ubuntu :: [bash] Edit The End Of The First Line In A File?

Jan 18, 2010

if I can create a bash script that once executer will edit or replace a line a in a file this line is the first one and its just one character that needs to be changed from a 1 to a 0.

How do I go about this? it is for a game called EVE Online, heres what my .sh look like atm

#!/bin/sh
echo fixing prefs.ini
#fix for prefs goes here
echo starting eve
eve

View 4 Replies View Related

Ubuntu :: Bash Script To Edit Gconf Settings?

Jul 8, 2011

I've been trying to write a bash script that will change the gconf settings for docky. The goal is to make it have a setup similar to Elementary OS or Pinguy OS... that means one docky instance on the bottom and one on the left. I just can't seem to get the commands working right at all. This is one setting I have been trying to change but every time I get an error about primitive types.gconftool --type List --set /schemas/apps/panel/general/toplevel_id_list [top_panel]

View 4 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

View 6 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

General :: SSH Connection From BASH Script Stops Further BASH Script Commands

Dec 3, 2010

What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.

View 3 Replies View Related

General :: Use Vim To Edit Any Text?

Feb 11, 2011

I come from the Mac world, where I use [URL] to edit text from anywhere in Vim.

Is there anything like that on Linux ? I'm already using "It's All Text" in Firefox, but I'm looking for something broader.

Also, I've looked at this thread, but it's only solutions for software X, and software Y.

View 3 Replies View Related

General :: How To Edit ECC Code

Jun 21, 2010

can I change the ECC code for a block of a file stored on a flash drive by any means ? of a file stored on a HDD (though I don't think there would be a difference between the two)Maybe , through some hardware interrupts or anything like that?Also if possible I need the solution to be in C/C++.

View 3 Replies View Related

General :: Use Sed To Edit A File?

Sep 4, 2010

I need to change one word in over a thousand pages of HTML. I think sed is the only way to do this, but I've never used sed before.

After reading the documentation, I see that it is pretty easy to alter files to standard output, in other words, the screen.

But I don't want to do just alter text to the screen, I want to alter the original file, else I am not doing any Stream EDiting as near as I can tell.

None of the documentation explains how to take a file, apply sed to alter that file. How do you do this?

Code:
[myuser@myhost dir]#sed s/changethis/tothis/ /mydir/myfile

How do I apply sed to actually make the changes to myfile?

View 3 Replies View Related

General :: How To Edit Rc.local

Jun 23, 2011

I am having big trouble with rc.local on my system.My system is CentOS 5.5 64X.My default startup is is 3, so rc3.d is where I was looking into.rc.local with permissions 755.Inorder to solve the problem I made the following test
.
1. No matter how I edit rc.local, it will not be executed, even a copy from other Linux system that runs rc.local fine.
2. All S99 service under rc3.d won't run when S99local is there.
3. All service executed just fine if S99local removed from rc3.d.
4. If I change S99local to S97local, Anything in S97, S98, S99 won't run.
5. I tested rc.local with Code:echo "rc.local is executed just fine" >> /root/test.txt by adding it after "touch /var/lock/subsys/local" [FAILED, test.txt not found after restart]
6. I tried to execute rc.local with Code:sh /etc/rc.local it was SUCCESSFULLY executed without any error, and everything in rc.local runs fine.

View 2 Replies View Related

General :: Edit The Timeout Value For In Cpu?

May 19, 2010

send pings test for hours to my router 10.0.1.1 and the ping test is perfect, never fail. 8024 send packages, 8024 packages received.
Now but when make the same ping tests for hours to my linux CPU, i saw that sometimes the ping test say timeout Whan can i do? Can i edit the timeout value for in my linux cpu? what you think? This is making me crazy because me linux cpu is loosing packages..

Code:
[root@TornadoR3 ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:08:02:F9:AB:FF[code].....

View 12 Replies View Related

General :: How To Edit The Job Using Crontab

Jun 1, 2010

I setup a cron job to trigger a script that I wrote every morning at 12:00 AM, but it does not seem to be working.

This is how I edit the job using crontab -e

Why it isn't triggering at 12:00 am every night. If I run the script manually it works just fine so I know is not the script causing troubles.

View 7 Replies View Related

General :: How To Edit The .bashrc

Feb 27, 2011

I want something like

Code:

export ROS_PACKAGE_PATH=~/ros:$ROS_PACKAGE_PATH

to be done already for me when I open a new terminal. How do I edit the .bashrc so that this variable is always set already?

View 3 Replies View Related

General :: How To Edit Vi Tab Size

Dec 25, 2010

I am learning vi and like it so far. I am writing Python code with it and would like to change my tabs from 8 spaces to 4. I saw somewhere that I should edit my .vimrc file and add :set tabstop=4, but I cannot find it (even when I run :version in vi, it tells me where my user and system .vimrc files are, but I cannot find them there).

View 4 Replies View Related

General :: Gedit On Mac Can Be Used To Edit Files Over Ssh?

Feb 4, 2011

I use a linux machine at work and a mac at home. I can ssh from my machine at home to my work machine. But the only editor that I have access to on the command line then is vi, which I don't like.

Is there a way to use gedit on my mac to edit files remotely over an ssh connection?

This page says that it can be done, but I think that it assumes that you are using gedit on ubuntu. On my mac (os 10.5.8) I don't have the "bookmark" option when I click "connect to server".

[URL]

View 3 Replies View Related

General :: Regex Edit In Skype?

Jan 13, 2010

I am not a big skype user, but I was chatting with my sister, made a typo and habitually typed

tpyo
s/tpyo/typo/

to my surprise it actually changed the history. I am using the linux skype client 2.1.0.47-r1 and my sister is using 4.something on windows.

When she tried to do the same thing, it didn't work. Does anyone know if this is specific to the linux version?

View 1 Replies View Related

General :: Use A LiveCD To Edit BIOS?

Sep 12, 2010

My computer's fine, and is running Puppy Linux happily, but I'm having trouble entering my BIOS menu (I forget the access key, and no matter which keys I try, Puppy Linux boots up).

Is it possible to edit BIOS settings from a LiveCD?

View 3 Replies View Related

General :: Edit UUID Using The Dd Command?

Oct 9, 2010

I have gone over the thread "Learn The DD Command Revised" (It was Fantastic) in the search for a solution to my query.

I have seen posted elsewhere that this code is supposed to be able to change the UUID number of NTFS partitions (useful when multi-booting with Grub2 and cloning partitions). Here is the code:

Code:
sudo dd if=/dev/urandom bs=80 count=1 | xxd -l 80 -c 8 | tail -1 | xxd -r - /dev/sda1
This is assuming that I want to change the UUID on the 1st partition on the 1st hard drive >>>sda1<<<
If I was trying to modify the 2nd partition on the 1st hard drive it would be >>>sda2<<<

[Code].....

NOTE: I was doing this while booting from Ubuntu's Live CD version 10.04.1 LTS (In case that is a factor)

View 10 Replies View Related

General :: Edit The Sudo File?

Apr 27, 2011

I need to have regular user run this command sync; echo 3 > /proc/sys/vm/drop_caches

but it requires root privileges that I cannot give.

So I figured they could run the command as "sudo". I looked in /etc/sudoers and wasn't sure what I needed to edit for the users to run the following command

sync; echo 3 > /proc/sys/vm/drop_caches

View 14 Replies View Related

General :: Want To Edit Multiple Files

Jun 28, 2010

I have a directory with hundreds of html files.
For all the files I have to:
- delete all the row from the beginning of the file to the sentence "<img src="immagini/_navDxBottom.gif" />".

- delete all the rows from the sentence "<br clear="right" />" to the end of the file.

How can I do that?

View 3 Replies View Related

General :: How To Edit Inittab File

Mar 25, 2010

The default setting of linux is run level 5 (Red Hat 9) I want to use my system in Runlevel 1. For that purpose i 1st check the permission which were

-rw-r--r--

I want to edit the File " vim /etc/inittab " in the terminal . which line should i edit so I may use it in a single mode.

2-The second thing i want to ask that before editing any important file which are /etc like "inittab" can i 1st make it's copy and keep it in my home directoty so,in case of any mistake I can get my original file?

View 2 Replies View Related

General :: How To Edit The Boot File

May 2, 2011

I installed 3 OS in my computer, first Windows xp, second Ubuntu 10.10 up to here I could go in to each one of them, but I installed Fedora 14 x64 after Ubuntu. Now I can only go to Fedora and XP, but I am not able to even see Ubuntu only in the shell, it is not in my boot options.

View 2 Replies View Related

General :: How To Edit Or Add Red Hat Package Manager

Dec 16, 2010

How to Edit or Add Red Hat Package Manager.

View 2 Replies View Related

General :: Edit .pub Format Files On Fedora?

Feb 9, 2011

Is there an aplication/software that I can use to edit the Microsoft publisher (.pub) format files on fedora14.

View 1 Replies View Related

General :: How To Edit Contents Table Of Pdf File

Jul 17, 2011

how do i edit the "contents" of a pdf file. I tried pdfedit but I cant find where the content table list is stored.

View 1 Replies View Related

General :: Edit All The Files Returned By Find In Vi?

Sep 15, 2011

Something I find myself doing a lot is running a find command and then editing all of them in vi, which looks something like this:

> find . "*.txt"
./file1.txt
./file2.txt
./path/to/file3.txt
> vi ./file1.txt ./file2.txt ./path/to/file3.txt

Is there a clever & simple way to do this all in one command line?

View 3 Replies View Related

General :: Read EDIT Text Files?

Jan 24, 2010

I'm needing to read the Adam's Assembly Tutorials, that are old EDIT *.txt files, I'm on Linux and I need to read this files.What can I do?Is there any GUI editor that can read the files?There is any way to convert them into another file that is more modern1?

View 2 Replies View Related







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