Software :: Calling DB User From Separate File In Shell Script?
May 23, 2011
I need to execute a SQL via shell script and i am connecting to Oracle DB by this way $USERNAME1/$PASSWORD1@$STRING1 and i need to get username, password and string from someother file stored in the Unix Directory. $Username, $Password and $String is stored in File A in Path A and i want to call it in the test.sh in Path B.
Format of File A.txt
Username=test_db
Password=*****
Instance=ORACLEDB
View 3 Replies
ADVERTISEMENT
May 4, 2011
I use U.10.4. I have to take over the work of another, but all I have is the Hard Drive from that machine. Because the two positions are separate, I do not want to Import his Evolution over my own - but, I do want to be able to access it from my machine. Can my Evolution refer to the old hard drive (now in a caddy and non-bootable) for the Evolution account data that is there, while still being able to switch back to my own Evolution data on demand. E.G. in Windows the equivalent would be the way that Outlook can refer to different .pst files at loading. Alternatively, can I make the external USB drive (previously a running main HDD) bootable without losing all of the data?
View 3 Replies
View Related
Nov 27, 2010
So I need to become the root user in order to edit a grub file in a seperate partition, so I can get back into this partition. How can I become and stay as root user in the desktop environment? (I know you shouldn't do this, but I need it.)
View 10 Replies
View Related
Aug 18, 2009
I have 2 shell scripts, script1.sh and script2.sh. I call script2.sh from within script1.sh ( by simple ./script2.sh command). Based on some condition, i use exit 0 to exit out of script2.sh. I was trying to find if i can exit out of script1.sh as well at once. below is the example
script1.sh
#!/bin/bash
echo "Before ..."
[code]....
When i execute below is the output
Before ...
There was problem file is empty
The Script will Exit. Please fix the issue and run again...
After ...
I am trying to exit out of script1.sh as well so that i dont print "After ..."
View 3 Replies
View Related
Jul 27, 2011
I am setting up a cron job, where i am calling a shell script to make few builds. I got struck at a point, need some expert inputs to proceed further. The script is categorized in 5 parts and in the last part while building software it asks for few questions like:-
1. Build mode choice
2. normal build
3. Copy Images
4. Arch
User manually has to input ans for these questions:-
1
yes
n
64
The ans's are fixed and this won't change. How shall i hard-code them or do something in the script so as when script flow reaches to this point it automatically take's these value. So far the cron job is not getting completed as it's waiting for user to key in these values manually. I had faced similar issue while building kernel modules but there it was easier as i had to take default values always:-
View 2 Replies
View Related
Oct 8, 2010
# variable declaration
stt=10
enn=20
stp=1
# I want to do it in the following structure but not sure how to call # the stt, enn and stp in a for loop
for (( i = $stt; i -le $enn; i=i + $stp ))
do
blah blah
done
View 9 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
Sep 28, 2009
I have a file called a.sql which I need to execute in a database and the script I am calling in a shell script .Before executing the script I have to change a value in the script according to the user input.How can I do this .
Eg...
A.sql file contains an sql query like this:
And My shll script is like this:
When executed the script it asks for enter salary and if the user has input 5000 then the Enter_salary value in a.sql must be replaced by 5000.
View 6 Replies
View Related
May 5, 2011
I have a program that I run from the terminal that requires manual input (it's matlab in mex debugging mode, matlab -Dgdb, which starts the GNU C debugger with its own custom settings).
Every time I run this program I always type in the same few commands in the program's interactive shell before I actually start working (for example: run -nojvm; stop at mexFunction; continue). I want to avoid typing these commands and I thought I could do this with shell scripting, saving the commands in the mycommands file, then running: myprogram < mycommands
The problem is that this runs all the commands and then exits the program. I want it to run the commands and return control to me so I can run my commands. Is there a way to tell the shell to use a file or a string as the input to a program then immediately return control to the user without the exiting the program?
View 3 Replies
View Related
Aug 10, 2010
I'm running a java app when my specific user (not root) login. It's running fine.The problem is that profile.local are calling my app twice ... The first call, it's blocking Linux environment until I close java app. After that, occurs the second call, then it's free Linux for usage.I tried to change my java app for gedit, and I can see the problem too.I tried with profile.local and /home/<my user>/.profile, the result is the same.
View 2 Replies
View Related
May 3, 2011
I'm trying to call a specific variable based on a user selection. For example:
Code: Select a file:
[1] foo.tar
[2] bar.tar
Enter a selection: I have already coded each possible selection to have its own variable. If the user selects 2 I need to select $SELECTED_TAR2, or if they select 1 I need to select $SELECTED_TAR1 and then do something like this behind the scenes:
Code: cp /home/user/$SELECTED_TAR2 /home/user/backup/$SELECTED_TAR2
I was thinking something like this:
Code: echo "Enter a selection: "
read -e SELECTED_NUMBER
cp /home/user/$SELECTED_TAR$SELECTED_NUMBER /home/user/backup
[code]....
View 2 Replies
View Related
Jun 15, 2011
MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
View 2 Replies
View Related
Apr 9, 2010
I am trying to call a script say mkdir.sh into another script that will make use of the dir's which are created in the first script. I know that I could code it all together, but I am trying to avoid rewriting the mkdir script as it is long.
View 7 Replies
View Related
May 1, 2011
I recently installed Ubuntu 11.04 with Unity as the default desktop environment, but I wanted Gnome 3 instead. So the installation of Gnome 3 and Gnome Shell went through, and I'm presented with a nice "gnomeish" gdm, but when I type my user password and try to log in all I get is this:
Code: Could not update ICEauthority file /home/pontus/.ICEauthority And all I can click is a button that logs me out.
I've tried from the terminal to change owner and rights and I've even tried to delete the file, but I still get this dialog every time I log in.
View 9 Replies
View Related
May 5, 2010
I want to try out KDE on Lucid, but I don't want to install KDE on top of ubuntu, because I will end up with two sets of applications and software that is gnome specific to load in the KDE environment.SOOOOO, I want to create a separate user that is only KDE and a user(my current one) that is only gnome. Different names, different environments and applications.
Also, if it is possible, I will need instructions to remove a user as well, so in the future I decide which one I like better, I can delete the other user account.
View 3 Replies
View Related
Feb 25, 2010
I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?
View 1 Replies
View Related
Dec 11, 2009
I am using the sudo command to log on locally as another user by the following command:
sudo -u theotheruser -s
or
sudo -u theotheruser sh
As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.
View 11 Replies
View Related
Oct 4, 2010
I am trying to use a software package written in ANSI C. It has a makefile which has to be executed first.
As soon as I execute it I get messages like: line i: command not found.
Commands for which I am getting errors :
CC = /usr/bin/gcc
GCCFLAGS = -c -Wall
ROOTDIR = .
My gcc compiler is located in the above directory only. In ROOTDIR also I tried giving the path in which all the required files & folders are present but still I get the command not found error in all the lines.
View 7 Replies
View Related
Mar 1, 2010
I am experiencing some weirdo problem since some time. I don't use this machine often, so I cannot trace since when the problem is there. Problem: In Firefox. Description: When a download is completed, it shows up in Downloads window. When I ask "open containing folder", it will:
-first display a warning: "This is not a CVS folder. If you did not intend to use Cervisia, you can switch view modes within Konqueror." -will open Cervisia.And how do I perform this "switch view modes" within Konqueror? I looked into Yast, and there is no way of removing cervisia, as it does not show up (but cervisia-kde4 does show up in the list, but it is not installed). I have no use of Cervisia, by the way.
I am on KDE 3.5, on openSUSE 11.1 x64. Firefox 3.6. I do have an install of KDE4 on this machine, but never use it. I followed the advice in here. First I had Nautilus as a file manager in Firefox, then some unknown one, then (following these advices) a very minimalist thing. But I still have this Cervisia critter. The problem is likely related to KDE/Konqueror, since I tried in Gnome, and it gave me no problem (it opened Nautilus instead of Cervisia).
View 4 Replies
View Related
Mar 30, 2011
I am trying to setup 2 individual FTP users. They should both have access to the same directory. They both need to be able to read/write into the directory. But, I want them not to be able to write to each other's files (e.g. delete, remove, rename, etc.).
So let's say the shared directory is: /home/ftp/shared/
UserA needs read/write access to /home/ftp/shared/. UserA should only have write access to his own files. UserB also needs read/write access to /home/ftp/shared/. UserB should only have write access to his own files.
It would be a unix box of sorts, but that is the only restriction. I could use whatever software. I am currently thinking pure-ftpd or vsftp but I am open to all ideas.
View 1 Replies
View Related
Sep 22, 2009
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.
View 1 Replies
View Related
Nov 16, 2010
How can I implement this: I encrypt a partition using LUKS, and store personal data on this partition. Then create a user account that solely deals with this partition and insulated from the Internet. Normally for each boot I do not even need to mount the LUKS encrypted partition, and when I mount that partition under that special user account, I can make sure that the Internet is cut off.
I'm going to do the installation these days, could you provide a brief sketch regarding what steps I should go through to implement the above result?
View 4 Replies
View Related
Oct 14, 2010
I have configured dovecot to use separate user and password file. Can I tell endmail to use it too? If not, then does postfix can this?
View 2 Replies
View Related
May 18, 2011
shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"
smthing like Code: #!/bin/bash
for files in /home/user/*
do
[code]....
View 1 Replies
View Related
Mar 13, 2010
I want to jail Skype into its own process and not the one I login with. That way, if a hacker breaks in, it's limited to this process and only the limited functionality that that user account has. The thing is this -- thousands of Linux guys run Skype, but Skype is hardly ever updated or have security patches, and we run it all the time. It seems like an easy avenue for an exploit. As well, my iptables firew all blocks input connections that I have not established, but Skype is an established connection. How do I create a Bash script that launches Skype under a separate user account?
View 3 Replies
View Related
Apr 26, 2010
I have some series of files, which actually named bellow
<day_month_yr>_<hh:mm:ss>.<host_name>.<IP.ip.ip.ip>.<log_name>.txt
I want to show this file name below the column may be
Date Time Host_Name IP_address Login_Name
----- ---- --------- ---------- ----------
<day_month_yr> <hh:mm:ss> host_name x.x.x.x log_name
...
View 5 Replies
View Related
Mar 10, 2011
Is it possible to do in Linux each mail be in single file. For example: i am having all the mail in /var/mail/root.
Quote:
From root@localhost.localdomain Thu Mar 10 21:47:47 2011
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.13.8/8.13.8) with ESMTP id p2AGHlx4004190
[code]....
is it possible to do every mail when i receive it not store in the /var/mail/root. and need to be store like /var/mail/root1(for firs mail) and for another mail would be store in diff file like /var/mail/root2(for second mail)
View 3 Replies
View Related
Jun 14, 2010
I have a file partially like this
209 c 89
215 a 76
603 B 190
626 f 240
I want to separate this file into two sub-files based on the lowercase and uppercase of column 2 so that the sub-files are like
file1
209 c 89
215 a 76
626 f 240
file2
603 B 190
View 4 Replies
View Related
Mar 2, 2010
I use DeVeDe a lot, and it works great for general conversion and DVD authoring. I don't know, however, how to create a DVD such that each of the original .avi files will be their own chapters. In other words, I have about six or seven .avi files (episodes of a season of a television show) and I want to create a DVD with those episodes that I can navigate separately. Do I first convert each .avi? How then do I create a single DVD with six or seven chapters/episodes?
View 2 Replies
View Related
Nov 16, 2010
I encrypt a partition using LUKS, and store personal data on this partition. Then create a user account that solely deals with this partition and insulated from the Internet. Normally for each boot I do not even need to mount the LUKS encrypted partition, and when I mount that partition under that special user account, I can make sure that the Internet is cut off. I'm going to do the alternate installation these days, could you provide a brief sketch regarding what steps I should go through to implement the above result?
View 2 Replies
View Related