Search Results

Search: Posts Made By: teiji
7,769
Posted By teiji
Thanks. Just like I wanted. If you don't mind,...
Thanks. Just like I wanted. If you don't mind, can you explain to me what the $NF stands for, and also the the gensub?
7,769
Posted By teiji
On the command line using bash, how do you split a string by column?
Input:
MD5(secret.txt)= fe66cbf9d929934b09cc7e8be890522e
MD5(secret2.txt)= asd123qwlkjgre5ug8je7hlt488dkr0p

I want the results to look like these, respectively:
MD5(secret.txt)= fe66cbf9...
2,940
Posted By teiji
You were right. I wanted the output to be in the...
You were right. I wanted the output to be in the ordered (by the state) of the hash. The output I provided in post #1 was what I got (unordered), not what I wanted.

I tried your code, and the...
2,940
Posted By teiji
Thanks for the reply. Well, I converted it to an...
Thanks for the reply. Well, I converted it to an array because I'm not too familiar with hash, and I need to get the data at like an index.
2,940
Posted By teiji
Print is not in ordered after hash converted to array
Perl:

Can anyone tell me why after I convert the hash into an array, when I print it out, it's not in the order like the hash? See below..


my %cityZip = ("Logan, AL", 35098,
...
5,844
Posted By teiji
Nvm. I figured it out. I needed to put all the...
Nvm. I figured it out. I needed to put all the files into an array and do a while loop.
5,844
Posted By teiji
Shell - How to iterate through all the files in a directory?
Hi,

I have a directory call Test, which contains files "a", b", "c", etc. I want to go through all of the files inside Test and remove any empty file. How would I do that with shell csh?

So far...
2,701
Posted By teiji
Thank you.
Thank you.
2,701
Posted By teiji
Perl - Need help on splitting string
Let's say I have a very long string with no spaces but just words stored in $very_long_string.

$very_long_string = "aaaaaaaaaaabbbbbbbbbbbccccccccccccdddddddddddd";

I can do this to split the...
12,292
Posted By teiji
Oh sorry, the command should be in ` ` (backdash)...
Oh sorry, the command should be in ` ` (backdash) because I'm using the Unix command inside of Perl.

Edited the topic.
12,292
Posted By teiji
Perl - How do you break the long line of codes into 2?
I'm trying to make this long line of codes in Perl looks nice by dividing it into 2 lines...

Before:
`echo "blahblahblahblahblahblahblahblahblahblahblah" >...
21,835
Posted By teiji
Thanks. Just like I wanted. I modified it a...
Thanks. Just like I wanted.

I modified it a bit to add spaces before and after the ----.
21,835
Posted By teiji
Perl - How to print a "carriage return" to an output file?
Let's say I want to write a program that run these 4 UNIX commands and redirect output to a file.

#!/usr/local/bin/perl
use strict;

`cd \$HOME > output.txt`;
`cut -f1 inputfile.txt >>...
82,262
Posted By teiji
I know zombie is a process state, but I'm trying...
I know zombie is a process state, but I'm trying to create one so I can see how it looks like.
82,262
Posted By teiji
How do you create a zombie process?
I'm very new to UNIX, so I need some help please.

How do I create a zombie process with just basic UNIX commands (no script, C, PERL, etc)? Please give an example. Thanks.
Showing results 1 to 15 of 15

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