Search Results

Search: Posts Made By: whyte_rhyno
1,707
Posted By in2nix4life
#!/usr/bin/perl # use strict; use...
#!/usr/bin/perl
#

use strict;
use diagnostics;

my @data;
my @sorted_data;
my $csvfile = "details.csv";

open(FH, "<$csvfile") or die "Unable to open $csvfile.\n";
@data = <FH>;...
1,444
Posted By in2nix4life
Take the input (let's say $input) and remove the...
Take the input (let's say $input) and remove the letters it contains from the variable containing the word (i.e. $word = "cupcakes"):


$word =~ s/$input//g;
2,860
Posted By drl
Hi. Using an array: #!/usr/bin/env bash ...
Hi.

Using an array:
#!/usr/bin/env bash

# @(#) s2 Demonstrate arrays and printing on one line.

# Utility functions: print-as-echo, print-line-with-visual-space, debug.
# export...
Forum: Programming 03-23-2012
3,666
Posted By pflynn
I would suggest you prefer strncat to strcat....
I would suggest you prefer strncat to strcat. strncat is the secure sister of strcat:



strncat - C++ Reference (http://www.cplusplus.com/reference/clibrary/cstring/strncat/)

usage of strncat...
Forum: Programming 03-23-2012
3,666
Posted By Corona688
Your buffer only has five bytes of space. ...
Your buffer only has five bytes of space.

Writing beyond that is rampaging through stack space, overwriting every local variable behind it until it finds and corrupts your stack frame itself,...
12,944
Posted By Scott
Yes, I got it! Too much Vino over Christmas, I...
Yes, I got it! Too much Vino over Christmas, I think :D

Anyway, this \s stuff doesn't work for me.

Perhaps change the "\s" to " \t" (space \t).

Your sed could also change, to:

sed...
1,223
Posted By pflynn
You should quote the $username variable: ...
You should quote the $username variable:


user_id=`awk -v val="$username" -F: '$1==val{print $3}' /etc/passwd`
Showing results 1 to 7 of 7

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