Search Results

Search: Posts Made By: sea
2,324
Posted By MadeInGermany
I think you did it correctly, and it should have...
I think you did it correctly, and it should have worked.
Using { } instead of ( ) can eventually save a sub-shell. Note that the closing } must be on a new line or preceded by a semicolon....
1,454
Posted By RudiC
select will take ANY list and turn it into a...
select will take ANY list and turn it into a menu:PS3="Enter Value X: "
select X in A B C D E F; do echo $X; done
1) A
2) B
3) C
4) D
5) E
6) F
Enter Value X:
Then, add a case ... esac...
2,324
Posted By infrared013
Help using Flock (file lock)
Hello,

I have been working on using "flock"/file lock to prevent two instances of a bash script from being executed. Below is a simplified version of what I have to illustrate the flock part. It...
Forum: What is on Your Mind? 02-03-2016
1,692
Posted By RavinderSingh13
Regarding guidance to learn *NIX more and more
Hello All,

This Poll/thread is for views of all forum user regarding following point:

There are many people in this forum who are actually not actually working on *NIX(admin or real...
992
Posted By bakunin
df has - per the POSIX-definition...
df has - per the POSIX-definition (http://pubs.opengroup.org/onlinepubs/007904875/utilities/df.html) - the option "-P" for exactly this: formatting the output in a consistent way across all...
804
Posted By Don Cragun
What operating system and version of sed are you...
What operating system and version of sed are you using?

What codeset is being used to encode the multi-byte characters in your input file?

What locale was being used when you ran the command...
898
Posted By Don Cragun
Ah, yes. With the data shown in the post #1 in...
Ah, yes. With the data shown in the post #1 in this thread:

/dir Path/; would print the 1st line once, and
NR==1 {print $3} would print the 3rd field in that line again.

Changing /dir Path/...
Forum: What is on Your Mind? 01-11-2016
1,172
Posted By jgt
When I was a teenager, I used to read Hot Rod...
When I was a teenager, I used to read Hot Rod Magazine. In one issue there was a joke with 2 young guys, and one says to the other 'We have a Stromberg 97 carburettor and a 9/16th box end wrench....
773
Posted By RavinderSingh13
Hello rahul2662, Following is the...
Hello rahul2662,

Following is the explanation for same which may help you, let me know if you have any queries on same.

awk -F"[[:space:]]+:[[:space:]]+" ####### Making field...
Forum: What is on Your Mind? 12-31-2015
964
Posted By RavinderSingh13
Welcome 2016, Happy New Year to All
Hello All,

I wanted to wish Happy New Year 2016 to every one in this forum. May GOD gives us strength to do hard work, learn new things, enjoy each and every moment of our life, do new...
855
Posted By Don Cragun
Is this a homework assignment? Homework and...
Is this a homework assignment? Homework and coursework questions can only be posted in the homework & coursework forum (https://www.unix.com/homework-coursework-questions/) under special homework...
1,508
Posted By Don Cragun
The diagnostic: /usr/bin/tui-print: line 1:...
The diagnostic:
/usr/bin/tui-print: line 1: $'\342\210\222': command not found
doesn't mean that bash was trying to execute something specified using $'...', it just means that it was asked to...
1,508
Posted By Don Cragun
I'm confused. The title of this thread is...
I'm confused. The title of this thread is "[BASH] Errormessages and Traps with a 'here-doc'", but I don't see any here-documents anywhere in the code you've shown us?

In the command:
trap...
1,897
Posted By Don Cragun
can be understood as redirecting any 'error...
can be understood as redirecting any 'error message' to /dev/zero.
Like:
tar cvzf "$file1.tgz" "$file1" 2>/dev/zero

... ... ...
[/QUOTE]
Although /dev/zero can be used this way on most...
616
Posted By RudiC
Wouldn't a simple sed do?sed -n '/^#/b;...
Wouldn't a simple sed do?sed -n '/^#/b; s,=,\t=\t,p' file
one = "some value"
two = bool
Forum: Solaris 11-11-2015
5,247
Posted By MadeInGermany
The primary purpose of /sbin is system recovery....
The primary purpose of /sbin is system recovery. Of course it is used by the "superuser".
Following that sense /usr/sbin was created with further "superuser" tools (dynamically linked).
BTW Solaris...
Forum: Solaris 11-11-2015
5,247
Posted By MadeInGermany
Jilliagre is right. E.g. bash sets SHELL to the...
Jilliagre is right. E.g. bash sets SHELL to the user's default shell if not yet set.
The old Bourne shell does not do that, but these systems use the login program - that does it.
And you are...
Forum: Solaris 11-03-2015
5,247
Posted By drl
Hi, sea. I'm not sure what you mean by...
Hi, sea.

I'm not sure what you mean by active shell. I think of the value of environment variable SHELL as the path of the login shell. Here are several invocations of shells and the value of...
1,435
Posted By RavinderSingh13
Hello sea, Following may also be an...
Hello sea,

Following may also be an option on same.
awk -v U=$(whoami) -F: '($1 == U) {print $6}' /etc/passwd
Actually in my server directories are having pretty similar names as users have...
1,435
Posted By cjcox
awk -v U=$(whoami) -F: '"/^" U "/" {print $6}'...
awk -v U=$(whoami) -F: '"/^" U "/" {print $6}' /etc/passwd
1,435
Posted By RudiC
As /.../ is a regex constant, it would try to...
As /.../ is a regex constant, it would try to match the literal string "U" at the begin-of-line. Try $0 ~ "^"U.
1,944
Posted By bakunin
What perhaps happened is: the output of curl is...
What perhaps happened is: the output of curl is "counting upwards" like scp, yum and a lot of other tools. They do this by not sending a line break at the end of the line but a simple "carriage...
1,944
Posted By RavinderSingh13
Hello sea, Could you please try as follows. ...
Hello sea,

Could you please try as follows.

awk '{for(i=1;i<=NF;i++){print i FS $i}}' Input_file
We can check by above command what's happening here, also if possible then show us sample...
1,944
Posted By RavinderSingh13
Hello sea, Could you please try following. ...
Hello sea,

Could you please try following.

awk 'END{print $2}' Input_file
No need to use tail and echo and then save it to a variable then. awk is capable to read files.Also I don't think...
1,078
Posted By Don Cragun
As sea said, your exit commands are exiting the...
As sea said, your exit commands are exiting the subshell in which they're located; not the parent shell... But, you can reverse the condition and use multiple && operators with a single || operator....
Showing results 1 to 25 of 242

 

Featured Tech Videos

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