Search Results

Search: Posts Made By: saps19
22,813
Posted By Neo
Try the full path without this built-in prefix: ...
Try the full path without this built-in prefix:

os.path.realpath(__file__)

Like this:

sys.path.append("", "/path/to/config")

Does something like that work?

Might be a good idea to...
22,813
Posted By wisecracker
Apologies for any typos... There is no better...
Apologies for any typos...
There is no better use than a working example...
Longhand using OSX 10.14.6, default bash terminal:
Last login: Mon Nov 18 09:29:24 on ttys000
AMIGA:amiga~> # My maths...
10,416
Posted By RudiC
Try the -s option. man sh: gsutil cat...
Try the -s option. man sh:

gsutil cat gs://sample-bkt/transaction_test/sample_scripts/test.sh | sh -s 12 14
7,540
Posted By durden_tyler
On a slightly different note: when will...
On a slightly different note:


when will the "else" branch be executed? :confused:
11,343
Posted By RudiC
ABSOLUTELY NOT! Please supply facts and...
ABSOLUTELY NOT!

Please supply facts and data. Show decent, meaningful (not overwhelming) sample input, the related output, and the hard logics connecting the two.
What does "change value at...
1,137
Posted By RudiC
Try (untested) awk 'FNR == 2 {print FILENAME,...
Try (untested)
awk 'FNR == 2 {print FILENAME, ($NF ~ /^load/)?$NF:$(NF-1)}' *.xml
939
Posted By Scrutinizer
Note: since the shebang says it is a bash script,...
Note: since the shebang says it is a bash script, that should be bash -x script_file
2,062
Posted By gacanepa
Great! Just to clarify, from the link that I sent...
Great! Just to clarify, from the link that I sent you can download the latest version of The Linux Command Line, which was released less than a month ago.
37,444
Posted By sramirez
[Solved] sort on multiple columns
Howdy!

Need to sort a large .txt file containing the following, using sort. First based on the 1st column, and then on the 2nd column:

Group01.01 1000500 31 0.913 -1.522974494...
7,101
Posted By fpmurphy
-z <string> tests to see if <string>, in this...
-z <string> tests to see if <string>, in this case $DTS, is of zero length. Man test(1) for further information about test. As to what DTS refers to, all that I can say without actually seeing your...
3,478
Posted By aigles
First, there are missing $ in your script : if...
First, there are missing $ in your script :
if [ "$varSSCode" == "11" -o "$varSSCode" == "56" -o "$varSSCode" == "93" ]; then


A possible solution (using a list of values, not an array)...
24,129
Posted By alanpachuau
Reading password and echo * character
Hi,

First of all i am using solaris 10. I want to write a script that ask user to enter password and read the character input from keyboard. The ask to re-enter the password and then if they are...
24,129
Posted By Perderabo
It's a lot of trouble....#! /usr/bin/ksh ...
It's a lot of trouble....#! /usr/bin/ksh

exec 4>/dev/tty

function getpass
{
typeset prompt=$1
typeset backspace=$(echo \\b\\c)
typeset enter=$(echo \\r\\c)
...
Forum: Solaris 07-26-2011
23,923
Posted By bartus11
Yes, it is true in most of the cases.
Yes, it is true in most of the cases.
Forum: Solaris 07-26-2011
23,923
Posted By jlliagre
More precisely they provide variants of commands...
More precisely they provide variants of commands complying with different standards:

/usr/bin: SVID/XPG3
/usr/xpg4/bin: POSIX.2/POSIX.2a/SUS/SUSv2/XPG4
/usr/xpg6/bin: POSIX.1-2001/SUSv3
...
Forum: Solaris 07-26-2011
4,749
Posted By itkamaraj
uname -v From the man command -v ...
uname -v

From the man command

-v Prints the operating system version.

---------- Post updated at 02:22 PM ---------- Previous update was at 02:22 PM ----------

issue...
464,567
Posted By oombera
The directory has to be empty to use the rmdir...
The directory has to be empty to use the rmdir command.. you can use rm yourdir/*; rmdir yourdir

Or you can use rm -r yourdir, but be careful. This is recursive, so all the files in yourdir will...
3,501
Posted By kshji
ENDOFSQL must be in the position 1 in the line....
ENDOFSQL must be in the position 1 in the line. The most safety method to fix.


exitConf()
{
while true
do
echo
printf "Do you want to continue with other Hubs[y/n]?"
read varWish
...
3,501
Posted By methyl
This line must start in column 1. ENDOFSQL
This line must start in column 1.
ENDOFSQL
6,974
Posted By Corona688
I think your $dos2unix_cmds needs to be a list,...
I think your $dos2unix_cmds needs to be a list, like @var, for $#var to return any sensible value. It will be 0 when var has 1 element, 1 when var has 2, etc.


If app_get_data doesn't return a...
5,818
Posted By alister
Use the [:cntrl:] character class with any tool...
Use the [:cntrl:] character class with any tool that supports regular expressions.

Regards,
Alister
1,957
Posted By panyam
vi file_name enter ctrl-V ctrl-M / ctrl-V...
vi file_name

enter ctrl-V ctrl-M / ctrl-V ctrl-C to generate ^M and ^C respectively.
6,368
Posted By Rksiva
Try this, it will check only the files having...
Try this, it will check only the files having permissions and we can also avoid the errors.

find . -type f -perm 666 -exec grep "pattern" {} \;

Change the permission, as what ever you want.
1,813
Posted By methyl
One idea is to count the number of times a user...
One idea is to count the number of times a user appears in the "who -u" list by using the "wc -l" command (which just counts the number of lines it sees).
The backticks ` ` are important and cause...
6,040
Posted By cambridge
How to write a UNIX man page
I realise that with GNU 'info' a lot of developers become, dare I say it, quite lazy when it comes to providing a well written man page - and some argue they're not needed at all. But I find, in the...
Showing results 1 to 25 of 33

 
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy