Dear experts
I am learning awk command through some books on Solaris 8.
I have tested the folloing command
awk 'BEGIN { print match ("And" , /d/)}'
then the result is as following
awk: syntax error near line 1
awk: illegal statement near line 1
Could you please help on this and just... (4 Replies)
I have a master shell, which calls another shell to export some env variables. But when I just run the child shell from the command line, and see if the variables are exported by doing,
echo $EXPORTED_VAR1
I am not seeing the value.
But I am sure, I am using the child shell from a master... (4 Replies)
hi i want to write a shell script to set environment variables . But i am not been able to set that for the current shell instead i have to spawn a new shell. Is there a way to set the env variable for the current shell using shell script in bash shell ?
Thnx (2 Replies)
Hi,
I am a newbie to unix as well as scripting. I need to write a script, which on execution sets the necessay oracle variables.
Can someone help me out as to how to proceed? also can u suggest good tutorial for bash/shell scripting?
thanks (1 Reply)
I am working with Sun Solaris 9 and I want to export the environment variable from my application(xxxx.ksh) but I am not able to see it when I am using SET command
I am writing some variables which I have to set
COMMON_USER_HOME=${HOME}
export COMMON_USER_HOME
echo... (6 Replies)
Hi all guys,
how you can read in thread title, I'm deploying a bash script in which I have to export some variables inside it.
But (I think you know) the export command works only inside the script and so, on exit command, the variables aren't set like I set inside the script.
Consequently in... (8 Replies)
Dear all,
I have a big table of 50 columns and more then 100, 000 rows in mysql. Could you please help me that how I can export it as .csv or . txt that I can open it in MS excel?????
OR how can I export the specific columns of the table???
Thanks
AAWT (5 Replies)
Hi
I want to read variables from one file and then set it as environment variable;
The text file is test.txt which contains
SPEED:1000
IP:172.26.126.11
My code is:
while read line; do
var1=`echo $line | awk 'BEGIN {FS=":"} { print $1 }'`
echo $var1
var2=`echo $line | awk 'BEGIN {FS=":"}... (8 Replies)
So i have a script that is like this:
#!/bin/sh
VARA="elementary 1
elementary 2
nursery A
nursery B
highschool AZ"
echo "${ContentOfADifferentSCRIPT}" | sh
i do not have control over the script that is inside the variable "${ContentOfADifferentSCRIPT}".
however, i know that the... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT OPENSOLARIS
print-service
print-service(1M) System Administration Commands print-service(1M)NAME
print-service - select, report, import, export active print service on a system
SYNOPSIS
print-service [-s service [-m] | -q | -e file | -i file]
DESCRIPTION
The print-service utility manages print service selection, as well as export and import of basic print queue configuration.
Only a user root privileges or with the Printer Management profile can change the active print service or import print queue configuration.
OPTIONS
The following options are supported:
-s service
Select the active print service for on a host. service can be one of lp or cups.
-m
Migrate print queue configuration during print service selection.
-q
Report the active print service on a host.
-e file
Export basic print queue configuration to a file.
-i file
Import basic print queue configuration from a file.
EXAMPLES
Example 1 Selecting a Print Service
The following command selects the CUPS print service as the active print service on a host.
# print-service -s cups
Example 2 Reporting the Active Print Service
The following command reports the active print service on a host.
# print-service -q
Example 3 Exporting a Print Queue Configuration
The following command exports the print queue configuration from the active print service.
# print-service -e /tmp/queues
Example 4 Importing a Print Queue Configuration
The following command imports the print queue configuration to the active print service.
# print-service -i /tmp/queues
EXIT STATUS
0
Successful completion.
non-zero
An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWpcu |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO intro(1), attributes(5)NOTES
The print queue configuration saved and restored during export, import, and migration is limited to queue name and device name. It is
likely that further configuration changes will be required before imported or migrated print queues become usable.
SunOS 5.11 18 Mar 2008 print-service(1M)