Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.12 seconds.
Search: Posts Made By: Scott
Forum: UNIX for Beginners Questions & Answers Linux 6 Hours Ago
Replies: 2
Views: 67
Posted By Scott
Your question is a little vague. Do you mean only...

Your question is a little vague. Do you mean only to report the direct parent of the .html file?

Like:

$ find . -name "*.html" | awk -F/ '{print $(NF-1)"/"$NF}'

e.g. a test:

$ mkdir...
Forum: Shell Programming and Scripting Linux 8 Hours Ago
Replies: 9
Views: 203
Posted By Scott
Do not post classroom or homework problems in the...

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum (https://www.unix.com/homework-coursework-questions/) under special...
Forum: Solaris Linux 2 Days Ago
Replies: 8
Views: 189
Posted By Scott
There's no need to delete the other question, it...

There's no need to delete the other question, it stands in its own right, I think.

(and it wasn't an "infraction", only a gentle reminder to use code tags :))
Forum: UNIX for Beginners Questions & Answers Linux 2 Days Ago
Replies: 1
Views: 91
Posted By Scott
The "S" at the end is the previous run-level -...

The "S" at the end is the previous run-level - that in effect before you switched to run-level 3.
Forum: Shell Programming and Scripting Linux 2 Days Ago
Replies: 3
Views: 135
Posted By Scott
Looking at your command prompt, you're logged in...

Looking at your command prompt, you're logged in as jeff, yet the PAM config is looking for archive?

Would it not be better to use the wheel group rather than individual users?


auth ...
Forum: Shell Programming and Scripting Linux 2 Days Ago
Replies: 1
Views: 151
Posted By Scott
You can set user as mandatory by testing if it's...

You can set user as mandatory by testing if it's set (although you may want to use another variable name (USER is a shell variable)):

i.e.

while getops ...; do
...
done
...
if [ -z "$USR"...
Forum: HP-UX Linux 2 Days Ago
Replies: 2
Views: 96
Posted By Scott
Yes, it is possible. The simplest way, I...

Yes, it is possible.

The simplest way, I would say, is to use a while loop with a read, setting the field separator (IFS) to : to get each field from the file, and inside the loop run the useradd...
Forum: Shell Programming and Scripting Linux 3 Days Ago
Replies: 2
Views: 132
Posted By Scott
Hmm. That is strange. Is there an alias to...

Hmm. That is strange.

Is there an alias to tee?
Forum: Shell Programming and Scripting Linux 3 Days Ago
Replies: 2
Views: 154
Posted By Scott
AWK goes.. awk 'BEGIN { do this } NR > 1 {...

AWK goes..

awk 'BEGIN { do this }
NR > 1 { .. }
...
END { do that }
'


BEGIN should not be preceded by a { - it's not based on any condition (such as NR > 1), it's just the first thing AWK...
Forum: Shell Programming and Scripting Linux 3 Days Ago
Replies: 2
Views: 164
Posted By Scott
I want to say there should be a space before the...

I want to say there should be a space before the ]


elif [ $? -eq 0]


Should be:

elif [ $? -eq 0 ]
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 9
Views: 215
Posted By Scott
I didn't see any either. Not sure what to look...

I didn't see any either. Not sure what to look for here.
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 10
Views: 193
Posted By Scott
But, the output you get is nothing like the...

But, the output you get is nothing like the output you expected. You can't arbitrarily join four lines together, out of context, and get the output you expect!

But if you're happy... :)

Another...
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 17
Views: 491
Posted By Scott
while read ip mac x; do echo $mac $ip done...

while read ip mac x; do
echo $mac $ip
done < file

00:71:CC:6E:A3:33 192.168.0.6
C0:38:96:72:8B:5B 192.168.0.7
08:ED:B9:08:94:09 192.168.0.8
D0:53:49:CB:FE:0F 192.168.0.9
C4:8E:8F:8F:45:A7...
Forum: UNIX for Beginners Questions & Answers Linux 4 Days Ago
Replies: 12
Views: 211
Posted By Scott
It really would help if I read your code more...

It really would help if I read your code more closely!
Not:

$ echo report_name
$ echo report_path

But:

echo $report_name
echo $report_path
Forum: What is on Your Mind? Linux 4 Days Ago
Replies: 50
Views: 694
Posted By Scott
Looking good. One nice feature you added...

Looking good.

One nice feature you added before, I think to the now-disabled Tapatalk, was a plugin to show a summary in WOL of how many users were on Windows, Linux, iPhone, Android, etc.. It...
Forum: UNIX for Beginners Questions & Answers Linux 4 Days Ago
Replies: 12
Views: 211
Posted By Scott
Remove the $ before the echo commands at the end...

Remove the $ before the echo commands at the end of the script.
Forum: UNIX for Beginners Questions & Answers Linux 4 Days Ago
Replies: 12
Views: 211
Posted By Scott
Two have two << EOFs. The first SQLPlus command...

Two have two << EOFs. The first SQLPlus command looks to be erroneous, and the opening of the command substitution around the other one is a single quote (') not a backtick (`).

More readable...
Forum: UNIX for Beginners Questions & Answers Linux 4 Days Ago
Replies: 12
Views: 211
Posted By Scott
Well, the first thing that jumps out is that...

Well, the first thing that jumps out is that you're using backticks (`) instead of single quotes (') around your awk commands, and an erroneous backtick after the closing EOF for your SQLPlus call.
...
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 10
Views: 193
Posted By Scott
What have you tried?

What have you tried?
Forum: AIX Linux 4 Days Ago
Replies: 2
Views: 112
Posted By Scott
Continue this in your other thread, here...

Continue this in your other thread, here (https://www.unix.com/aix/275305-filesystems-under-hacmp.html).
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 1
Views: 111
Posted By Scott
As previously advised, please do not post...

As previously advised, please do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 12
Views: 398
Posted By Scott
Well, if you want to monitor the log, it doesn't...

Well, if you want to monitor the log, it doesn't make much sense to exit (or break) at all.


tail -fn0 test.log | while read line; do
if [[ "$line" =~ "Pattern1" ]]; then
# do something here...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 12
Views: 398
Posted By Scott
To append what? $line? If so, simply echo...

To append what? $line?

If so, simply echo that, grepping what need, if required, and redirect that to the log file.
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 12
Views: 398
Posted By Scott
exit will exit the script (or shell), and break...

exit will exit the script (or shell), and break will exit the while-loop.

You can use grep -E or egrep to search for multiple patterns, using a pipe character to separate the terms, and use the...
Forum: Post Here to Contact Site Administrators and Moderators Linux 1 Week Ago
Replies: 6
Views: 332
Posted By Scott
I've activated your goya account and disabled...

I've activated your goya account and disabled your rrodgers account.
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 10:19 PM.