Programming :: Exporting In A Shell Script?

Nov 26, 2010

I am aware this has probably been covered hundreds of times, so apologies if so. I am fairly new to the linux scripting scene, so again apologies if what I'm saying seems pretty odd and makes no sense. I am attempting to write a script for some Linux Fedora test servers I have set up. For me to change which domain I have this set to point to, I would have previously changed the HOSTS and profile files manually, however I managed to make a script which changes these easily with the use of one command to launch the script.The problem I'm having is getting it to use the "export" command. I am aware this would have to be launched in the parent shell rather than the child and so I made a seperate script which has "export SIP_DOMAIN="test.blah.net" in it and had the first script "source" it. This doesn't work and I've probably done something somewhere that is incredibly stupid.

View 2 Replies


ADVERTISEMENT

Programming :: Exporting Makefile Variables To $(shell) Environment?

May 12, 2010

I'm aware that one can export make variables to other makefiles; however, how does one export them to the environment of $(shell)? Take the example below:

Code:
export TEST
VARIABLE=$(shell echo $$TEST)
.PHONY: all
all:
#$(VARIABLE)

In this example, I might call make TEST=test. The goal is for $TEST to be available to the environment of the shell escape. This is because I need its value in a script which is called. For example:

Code:
VARIABLE=$(shell i-need-TEST.sh)My current solution is the following:VARIABLE=$(shell export TEST="$(TEST)"; i-need-TEST.sh) but this only works if I know all if the variables needed at that point (as opposed to being able to export variables in included makefiles.) Is there an easy solution?

View 4 Replies View Related

Programming :: Script Not Exporting Variables?

Jun 7, 2011

I have sles 10 . A user has a default shell of tcsh. I want to run a script which has to use ksh . In that script only some variables are exported, which will be used in subsequent scripts which are called inside it.

But the variables are not exported. I am unable to find whether its a conflict of shell or what ?? I tried with debug mode, it only displays the command but not execute anyone ..

View 14 Replies View Related

Programming :: Exporting Glade Text View To Text File?

Jan 8, 2011

I want to display something in my text view widget in glade using c code. that's all right.
now I need to attach a save button beneath the text view.so that on click the text view content should save as a txt file..

View 8 Replies View Related

Programming :: Shell Scripting / Create A Shell Script Similar To Ls?

Jun 5, 2011

I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.

Code:
if [ $# -eq 0 ] ; then
d=`pwd`
for i in * ; do
if test -d $d/$i ; then
echo "$i:"
code....

View 10 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

Programming :: Prevent "leak" Into Shell From A Customized Shell Menu Script?

Dec 15, 2009

I've created a simple script based menu. This menu will be accessed by only a certain users via ssh.When user logs in, the menu will automatically run. (configured at user's .bash_profile).How do I force the session to close when user hits Ctrl-C or Ctrl-Break ?In a nutshell, I don't want user to have access to shell.

View 11 Replies View Related

Programming :: Shell Programming - Delete User Input

Jan 21, 2011

I recently started shell programming and my task now is to do a menu display.Currently i am stuck whereby user will input both title and author and it will delete it.

Do i have to use sed command?

View 4 Replies View Related

Programming :: Possible To Assist In Programming Shell Scripts?

May 17, 2010

Is it possible to assist in the programming Shell Scripts
Job:
To send a message to the email,All orders written in Terminal or ssh
example : ls , pwd , cat , and other

View 1 Replies View Related

General :: Exporting GUI Console ?

May 9, 2011

Is it possible to export the console display to my desktop?

I'm running Exceed 14.x the console is RHEL 5.6 running gnome.

I know how to export my display in an individual putty session and run whatever x app I need, but would like to be able to export the console session to my desktop also.

View 1 Replies View Related

Programming :: How To Turn Non-interactive Shell Into Interactive Shell?

Feb 4, 2011

I have a situation where I am in a non-interactive shell. I have tried from within my non-interative shell to spawn an interactive shell but my output still does not goto me. Isn't there a way I can somehow go into /proc or somwhere and make the output my /dev/tty1? Or some way else to remedy this?The situation arises because I drop from my restricted shell environment (a sort of CLI interface), into the actual Linux shell. I cannot change the code of the CLI environment I am just faced with being in the linux shell environment and its non-interactive. Its very annoying to have to put > /dev/tty1 after every command I type.

Not to mention it seems damn near impossible to get pagers like more and less to work properly when your in a non-interactive shell.

View 2 Replies View Related

OpenSUSE :: 11.3 - Exporting Images To Camera

Dec 5, 2010

We need to export images to camera but digikam does not support this feature. Is there any linux program that supports export to camera. Open Suse 11.3

View 1 Replies View Related

General :: Exporting A Variable From Within .xsession?

Mar 31, 2011

I'm trying to export a variable from within the .xsession so it will be available to any application started afterwards.

Here is a minimial .xsession file:

Code:

export MYVAR=123
exec gnome-session

The problem is that when I start a terminal and do:

Code:

echo $MYVAR

I get an empty string, meaning it's undefined.

View 2 Replies View Related

Fedora :: Gpg - Exporting Secret Keys Not Allowed ?

Apr 20, 2010

I have a problem with export a secret key with Fedora 12.

When i did this command:

Code:

I had an error:

Code:

View 1 Replies View Related

OpenSUSE :: Hassles - Exporting SWF From OO-Impress 3.1.1/Suse 11.2?

Feb 21, 2010

Anyone else tried to export SWF files from OO-Impress 3.1.1 with 11.2 as the platform.

I have an odp file I had under 10.3 which can be exported,yet cannot under 3.1.1/11.2

goal: to be able to use the Flash export in Impress presentations.

View 1 Replies View Related

General :: Exporting Environment Variables In Ubuntu?

Jun 2, 2010

I know many people have asked about environment variables before, but I am having a hard time dealing with these paths while ensuring I don't mess around with the original settings. How would you go about executing these commands in Ubuntu in terms of environment variables?

put /home/stanley/Downloads/ns-allinone-2.34/bin:/home/stanley/Downloads ns-allinone-2.34/tcl8.4.18/unix:/home/stanley/Downloads/ns-allinone-2.34/tk8.4.18/unixinto your PATH environment; so that you'll be able to run itm/tclsh wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put
/home/stanley/Downloads/ns-allinone-2.34/otcl-1.13,
/home/stanley/Downloads/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.

[Code]....

View 1 Replies View Related

Ubuntu :: Exporting Evolution From Command Line

Jan 19, 2010

I need to export Evolution from a hobbled system, whose gnome interface cannot run. Is there a way to do this from the command line?

View 2 Replies View Related

Ubuntu :: Exporting ALL Evolution Address Books?

Mar 26, 2010

Exporting the default evolution address book to a cvs file is relatively simple:"There is an obscure utility called evolution-addressbook-export that does the job. To find it use the locate command on your system as it isn't in your normal path. Mine was located :

/usr/libexec/evolution/2.6/evolution-addressbook-export
to use is simple :
/usr/libexec/evolution/2.6/evolution-addressbook-export --format=csv >contacts.csv"[URL]..

But this ONLY exports contacts from the default address book (Personal address book), not other address books one may have created in evolution. SO HOW SHOULD THE COMMAND BE MODIFIED TO EXPORT ADDITIONAL ADDRESS BOOKS THAT ONE HAS CREATED?Cannot find an answer to this anywhere - most frustrating.

View 3 Replies View Related

Ubuntu :: Exporting Evolution Contacts To Thunderbird?

Apr 7, 2010

I am trying to figure out how I can export my evolution contacts information into a Thunderbird application on my desktop (at work). I back up the files onto a flashdrive into the evolution-backup.tar file which Evolution uses as the default backup file. But Thunderbird doesn't recognize the file type.

View 5 Replies View Related

Ubuntu :: Exporting Software Sources And Keys?

May 31, 2010

I have added several PPAs and their respective auth keys to my netbook. export this info to a text file so that I can use the same in my office computer? (Both are running Lucid).

View 2 Replies View Related

Ubuntu :: Server Not Exporting CUPS Printer?

Nov 2, 2010

server not exporting CUPS printer?

View 2 Replies View Related

Red Hat / Fedora :: Exporting Display Between Servers - Getting Error

Jan 20, 2011

I am using Cygwin and Xming server to bring back the display from Linux server to a Windows machine.

I am following the below steps :-
1.Close down all X Servers
2.Run XMing - XLaunch
3.Select Multiple windows
4.Select Start no clients
5.Tick No Access Control box
6.Click Finish
7.X Server starts and you should see icon in tray
8.Run Putty/SSH in Cygwin
9.SSH to server you want to connect to
10.Enter: export DISPLAY=192.168.0.1:0.0 (replace 192.168.0.1 with your IP)
11.Run dbca.

On using similar steps I can bring back the display from some Linux servers, but not from others, can you please let me know what the problem is and what things I need to verify. I am not getting any error, some of the last lines from the message in the log states :-

winProcEstablishConnection - winInitClipboard returned.
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - Hello
DetectUnicodeSupport - Windows XP
winClipboardProc - DISPLAY=127.0.0.1:0.0
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.

I did a grep X11 /etc/ssh/* the result is as following :-
/etc/ssh/ssh_config:ForwardX11 yes
grep: can't open /etc/ssh/ssh_host_dsa_key
grep: can't open /etc/ssh/ssh_host_rsa_key
/etc/ssh/sshd_config:# X11 tunneling options
/etc/ssh/sshd_config:X11Forwarding yes
/etc/ssh/sshd_config:X11DisplayOffset 10
/etc/ssh/sshd_config:X11UseLocalhost yes

View 1 Replies View Related

Server :: Configuring Syslog And Exporting Of Logs?

Jan 17, 2011

configure syslog server on ubuntu now i want to export logs of windows and ubuntu desktop to the syslog server

View 6 Replies View Related

Server :: Exporting Partition On USB Stick As NFS Volume

Jan 5, 2011

I have a USB disk which has 2 partitions. It is the default behavior in the OS (Lucid 10.04 64 bit) that upon connecting a USB (be it thumb drive or hard disk) it will mount it in:
/media.

I have 2 partitions on the USB hard disk as follows:
ls -l /media
drwxrwxrwx 2 tkmsr tkmsr 2048 2010-02-12 04:12 HPLAUNCHER
drwx------ 7 tkmsr tkmsr 4096 1970-01-01 05:30 vol1
drwx------ 1 tkmsr tkmsr 20480 2011-01-03 17:43 vol2

I want to share vol2 on nfs. Here is the /etc/exports file entry on nfs server
/media/vol2 192.168.1.0/24(rw,sync,no_subtree_check)
On the client machine I tried to mount the above nfs volume
mount -t nfs 192.168.1.19:/media/vol2 /mnt/nfs

Things worked well upto here. But I was not able to go inside the mounted volume at the client machine. Hence I checked the permissions on the folder on nfs server they were as follows
drwx------ 1 tkmsr tkmsr 20480 2011-01-03 17:43 vol2
and the share mounted on client machine which was above only had following permissions:
drwx------ 1 client_hostname client_hostname 20480 2011-01-03 17:43 vol2
Considering this to be source of problem I tried to change the permissions at the server:
chmod -R 755 /media/vol2
but this attempt failed..

I checked by mount command the type of file system on USB disk:
/dev/sdb2 on /media/vol1 type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)
/dev/sdb5 on /media/vol2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sr1 on /media/HPLAUNCHER type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)

and the
/var/log/syslog
shows
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Mounted /dev/sdb5 (Read-Write, label "vol2", NTFS 3.1)
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Cmdline options: rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,dmask=0077
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Mount options: rw,nosuid,nodev,uhelper=udisks,silent,allow_other,nonempty,relatime,fsname=/dev/sdb5,blkdev,blksize=4096,default_permissions
Jan 6 10:24:12 tkmsr ntfs-3g[2278]: Global ownership and permissions enforced, configuration type 1

Where I see ntfs-3g driver in use for the above volume which I want to export on nfs.Can this be the source of my problems? Or I need to check some thing else? I notice the output of mount command:
/dev/sdb5 on /media/vol2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
Is there a way I can enforce to load changed permissions on the said USB and change this default behavior.

View 2 Replies View Related

Software :: Exporting Notes From E-book Into PDFs?

Sep 2, 2010

I'm trying to run Jarnal for purposes of exporting notes from my e-book (Sony PRS-600) into PDFs. (Anyone interested in the details can check out [URL]..There's a .deb for Jarnal available, which installs successfully, but trying to run Jarnal produces the following error message:/usr/bin/jarnal: line 17: 4089 Aborted java -Xmx192m -jar ${JARNALDIR}/jarnal.jar -g -t ${TEMPLATESDIR}/templates/default.jaj "$1" "$2" "$3" "$4" "$5"The Jarnal .deb is available at [URL]general /soft.arnal-down.htm There's also a regular zip package available, and trying to run that after unzipping produces the following:

[Code]...

View 2 Replies View Related

OpenSUSE Install :: Exporting Chosen Software During Installation?

Jan 29, 2010

I'm doing custom minimal OpenSUSE installation and trying to export detailed list of chosen software in yast on USB (FAT32) drive, but cannot locate the drive itself. It definitely is recognized by SUSE, since i can see it in partitioning section, but after that i just can't find it in yast (mnt, media,...).Is there any other way to mount/recognize the drive, because i just don't have any other idea how to backup that chosen software list?

View 8 Replies View Related

Ubuntu Networking :: Exporting Network Connections Configuration?

Jul 4, 2011

i'm currently using ubuntu 10.04 and wanted to update to 11.04 and that means backing up all sorts of data and configuration.Regarding the wireless configuration list, i have a few with password and auto connect, i wanted to know if there is a way of saving that listconfiguration other then manually.

View 3 Replies View Related

Ubuntu Networking :: Server Not Exporting CUPS Printer?

Jul 8, 2011

server not exporting CUPS printer?

View 9 Replies View Related

Ubuntu Servers :: NFS - Exporting Multiple FS With Single Line?

Jul 26, 2011

I'm using my home server to netboot into live CDs. To summarize that article, netbooting a liveCD system involves passing an NFS host:/path in kernel's command line, which is subsequently mounted as /cdrom on the live system. The article mentions copying the contents of the iso image to a place on the hard drive, but I see no reason for this, since the contents need to be read-only anyway, which is easy to achieve by mounting the iso through a loop device:

Code:

# mount
...
/dev/loop0 on /mnt/kubuntu-lucid-amd64 type iso9660 (ro)
/dev/loop1 on /mnt/kubuntu-natty-amd64 type iso9660 (ro)

[code]....

Now, I am using NFS to mount a regular (rw, HDD) directory which I use as a network drive and I can mount any subdirectory and still access all the files within, ie. when I export /data on the server, I can still mount /data/downloads on the client:

Code:

server:# exportfs
/data 192.168.1.4/32
client:$ sudo mount -t nfs 192.168.1.1:/data/downloads /mnt/netshare

[code]....

Is it possible to export just /mnt and be able to mount any/all of the subdirectories? NFS doesn't like going across multiple file systems:

Code:

server:# ls -al /mnt/kubuntu-natty-i386/
total 3532
dr-xr-xr-x 11 root root 4096 2011-04-27 11:29 .
drwxr-xr-x 7 root root 4096 2011-07-25 21:46 ..

[code].....

When I try to export just /mnt and mount /mnt/kubuntu-natty-i386 on the client, the mount succeeds but the mounted directory is empty.

View 1 Replies View Related

Programming :: Shell Script To Tee ITSELF

Dec 10, 2008

I have a shell script that I would like to log to stdout and also to a file.....much like using tee. I would like to, instead of calling the script and piping to tee...i would like for the script to tee itself.

View 4 Replies View Related







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