Hi,
I am new to shell scripting, Can any body suggest me how I can split a string with a delimiter as whitespace into words and store into a array.
I have read a line from file, now I want to split the line into words and store in a array for further use.
eg : the sky is blue
want... (3 Replies)
Hello,
I am recently working on an application that sends large strings accross a network very often. These then need to be broken up first with '!' and then with ','. My current function (below) works fine for this when not too much data is being sent across the network but segfaults when a... (4 Replies)
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 string into 1 character each and store them in an array:
@myArray = split(//, $very_long_string); ... (3 Replies)
Hello all!
I'm trying to put together a small script that will take in a file name and attach a datestamp to the end of it (but before the file type extension).
To illustrate...
Before:
filename.txt
anotherfilename.txt
After:
filename_20090724.txt
anotherfilename_20090724.txt
... (7 Replies)
Hi,
I have a string like this in a file,
I want to retrive the words separated by comma's in 3 variables. like
How do i get that.plz advice (2 Replies)
Hello I need help with the following. I have strings like
#if defined(__def1__)
#if defined(__def1__) || defined(__def2__)
#if defined(__def1__) && defined(__def2__) && defined(__def3__).
#if defined(__def1__) || defined(__def2__) || defined(__def3__).
I need to print what is there in... (4 Replies)
Input:
Debris Linux is a minimalist, desktop-oriented distribution and live CD based on Ubuntu.
It includes the GNOME desktop and a small set of popular desktop applications, such
as GNOME Office, Firefox web browser, Pidgin instant messenger, and ufw firewall manager.
Debris Linux ships... (5 Replies)
Hi Experts.
I'm stuck with the below AWK code where i'm trying to move the records containing any special characters in the last field to a bad file.
awk -F, '{if ($NF ~ /^|^/) print >"goodfile";else print >"badfile"}' filename
sample data
1,abc,def,1234,A *
2,bed,dec,342,* A ... (6 Replies)