Search Results

Search: Posts Made By: m1xram
13,067
Posted By m1xram
'useradd' takes care of all that. It will also...
'useradd' takes care of all that. It will also add the default directory and files in the new home directory and add the appropriate entries into /etc/passwd and /etc/shadow. No need for a counter....
130,405
Posted By m1xram
Loop Rewritten
Thanks Chubler, I saw a similar work around with files but didn't know of the <( ) construct.

To Corona, I didn't say it was a bug and didn't blame the universe's problems on BASH. LOL Get...
13,067
Posted By m1xram
egrep -q "^$username:" /etc/passwd if [ $? -eq...
egrep -q "^$username:" /etc/passwd
if [ $? -eq 0 ]; then
echo "found"
fi
I don't understand your question about the carat character. '^' can be inserted like any other character. In VI you...
130,405
Posted By m1xram
BASH bug
#!/bin/ksh
until [[ $# -qe 0 ]];do
if [[ "$1" =~ ^[0-9]+$ ]]; then
# Regex matched filename of only numbers.
fi
shift
done
Sometimes you have to use KSH to overcome the...
13,067
Posted By m1xram
groupadd useradd
Couple of thoughts. Once you find that a department doesn't exist and create the directory for, it you may wish to create a group for it with 'groupadd'. Then set the GID to the newly created group....
130,405
Posted By m1xram
Many languages allow you to use both glob and...
Many languages allow you to use both glob and regex to match strings. PERL, TCL, and Java are a few examples.
130,405
Posted By m1xram
More information. Bash glob...
More information.


Bash glob (http://mywiki.wooledge.org/BashGuide/Patterns)
Bash regex (http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_04_01.html#sect_04_01_02)

Most things can be...
Forum: Programming 03-17-2011
2,405
Posted By m1xram
More information on fflush...
More information on fflush (http://www.elook.org/programming/c/fflush.html)().
130,405
Posted By m1xram
glob vs regex
Chubler,

Nice solution for multiple variable matching. The only thing I'd add would be to note that these are 'glob' matching patterns rather than 'regex' patterns for other readers.
2,869
Posted By m1xram
Why CD?
Do you 'cd path1' because dir_links_list contains relative paths? If so then there is no way to not go there. If it contains absolute paths methyl's solution works well.

Don't sell 'find' short....
3,221
Posted By m1xram
Commands Report and Add for DB
Here's an Sqlite dump of the table def:
CREATE TABLE parts (id integer primary key autoincrement,qty int8 not null,price int8 not null,item varchar(20) not null unique,desc varchar(255) not null);...
12,712
Posted By m1xram
IN OUT variables
@k_manimuthu

Don't see any examples of using IN OUT INOUT variables (http://dev.mysql.com/doc/refman/5.1/en/create-procedure.html) at the link you posted which was what the problem was. Once they...
3,221
Posted By m1xram
design
Thought about it for a long time as this could be a lengthy procedure and I'm a bit busy with my job now. But I can help you in my spare time.

To create your simple database we need to know what's...
12,712
Posted By m1xram
Common MySQL Procedure problem
Did a lot of googling and found that many people have this problem. PHP people got rid of it with the PDO interface but I found an example of a simplified answer for PERL.

First, the stored...
12,712
Posted By m1xram
MySQL Procedure
Looked at the MySQL Documentation for Create Procedure (http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html) and did this as the "root" user...
mysql> delimiter //
mysql> create procedure...
40,436
Posted By m1xram
multiple spaces
Your input shows multiple spaces, do you want just one...

sed -e 's/\'//g -e 's/,/ /g' -e 's/[ \t]\+/ /g' test.txt

BASH eats the '+' sign so it is escaped.
Forum: Programming 01-19-2011
5,725
Posted By m1xram
Command line options
See Guide to debug for dbx (http://www.sco.com/support/docs/openserver/600/porting/debug4dbx.html). Think you want "-l" on the command line and add the path to source code.
3,221
Posted By m1xram
SQLite
Most of database stuff is done for you already with SQLite and there's a CPAN.org module for it. See module DBD::SQLite (http://search.cpan.org/%7Eadamk/DBD-SQLite-1.31/lib/DBD/SQLite.pm). Other...
16,044
Posted By m1xram
Tricky
So..

A char is RE ([a-zA-Z][\^\$\~])

A fill is RE [\.,]

Freq = fills / (chars + fills)

Input:
F1 F2 F3 F4 Aa$.c$A..,.$,.,$.^~.
F1 F2 F3 F4 one^~.two.a$threeA$four.five$six
F1 F2 F3 F4...
16,044
Posted By m1xram
instances of delimiters
There are some issues with the match strings you supplied. For one some match strings are substrings of others. If you wanted to know occurrences of ".$" and "." you'd have to look at the count of...
19,736
Posted By m1xram
dash l
Now I see why the multiple greps work. '-l' slims down the filelist. I got awk to also do it but it is not as simple.

find . -name '*.cc' -exec \
awk '/header\.h/{x=1}
/x()/{y=1}
...
16,044
Posted By m1xram
samples
Always post some sample data. A couple of input lines and then the desired output. So here's a guess....

{
count = split($9, a, "[.,~^]");
printf ("%s %.3f\n", $0, (count - 1) / $8);
...
5,552
Posted By m1xram
I thought you wanted the A and B fields to...
I thought you wanted the A and B fields to increment. If that's incorrect just change the first part of the echo command.

#!/bin/bash

outfile=test17.out
if [ -e $outfile ]; then
rm...
Forum: Ubuntu 06-06-2010
9,352
Posted By m1xram
login
Looked at Online Database (CSRS Online Database) (http://webapp.csrs.nrcan.gc.ca/field/Scripts/CSRS_PPP_main_e.pl) which redirected me to a login screen. No surprises there but I can't WireShark (WS)...
Forum: Ubuntu 06-03-2010
9,352
Posted By m1xram
cookies and javascript
Ran Wireshark (WS) and found out a couple things.


You must be registered.
It does use cookies.
JavaScript generates a random ID.
Upload file is multipart MIME format.
Intermediate...
Showing results 1 to 25 of 61

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