10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I have string (string can have more sections)
LINE="AA;BB;CC;DD;EE"I would like to assigne each part of string separated by ";" to some new variable.
Can someone help? (4 Replies)
Discussion started by: vikus
4 Replies
2. Shell Programming and Scripting
Hi All,
How to split the string KAR_Celltick_Ban_GSMGW3 and want to pickup the third filed. Sometime the string may be "KAR_Celltick_Ban" like this
Thanks in advance (1 Reply)
Discussion started by: sujit_kashyap
1 Replies
3. Shell Programming and Scripting
hi,
i am trying to write a script to generate ouput in the following format:
##### buildappi abcd_sh nodebug.#####
##### buildappi ijk_sh nodebug.#####
The given string is as follows:
xtopSharedDLLs = "abcd_sh def_sh ijk_sh " \
+ "jkl_sh any_sh... (15 Replies)
Discussion started by: Rashid Khan
15 Replies
4. Shell Programming and Scripting
How can I split following input into stwo strings:
Input:
1^~^2^~^3^~^4^~^5^~^6^~^7^~^8^~^9
Output:
$string1 = 1^~^2^~^
$string2 = 3^~^4^~^5^~^6^~^7^~^8^~^9
Note: the length of string may vary, say upto 15. String 1 will contain only first two. string2 will contain... (10 Replies)
Discussion started by: som.nitk
10 Replies
5. Shell Programming and Scripting
Hi
I have a file say text.txt and has data as below.
text.txt
-------
/abc/def/tom/hanks
/abc/def/al/pacino
/def/dgg/matt/damon
Now I have to cut the field 3 and field 4 treating / as delimiter and save in the same file. Below is the how the output should be in the same file.
I... (1 Reply)
Discussion started by: lijjumathew
1 Replies
6. Shell Programming and Scripting
I am trying to take first 3 columns in a file which matches the word "abc", but i am getting the below error,
<error>
Global symbol "@F" requires explicit package name at ./new.pl
</error>
whereas when i give the below,grep abc /home/test/file.txt|perl -lane 'print \"$F $F $F\" in unix prompt... (4 Replies)
Discussion started by: anspks
4 Replies
7. Shell Programming and Scripting
Hi,
I have file: data.log.1
### s1
main.build.3495
main.build.199
main.build.3408
###s2
main.build.3495
main.build.3408
main.build.199
I want to read this file and store in two arrays in Perl.
I have following command, which is working fine on command prompt.
perl -n -e... (1 Reply)
Discussion started by: ashvini
1 Replies
8. Shell Programming and Scripting
All I'm trying to split a string at the $ into arrays
@data:=<dataFile>
a $3.33
b $4.44
dfg $0.56
The split command I have been playing with is:
split(/\$/, @data)
which results with
a .33 b .44 dfg .56
any help with this is appreciated
/r
Rick (9 Replies)
Discussion started by: schultz2146
9 Replies
9. Shell Programming and Scripting
i want to split the input by a space and remove specific characters like full stop, comma...... etc. and then save each word in an array.
i got something below, but it didn't work. can anyone please help me?
Thank you
#!/usr/bin/perl -w
while (<>)
{
$line = <>;
@word = split(' ',... (6 Replies)
Discussion started by: mingming88
6 Replies
10. Shell Programming and Scripting
Hi All,
I am trying to convert the below Csh code into Perl.
But i have the following error.
Can any expert help ?
Error:
ls: *tac: No such file or directory
Csh
set $ST_file = `ls -rt *$testid*st*|tail -1`;
Perl
my $ST_file = `ls -rt *$testid*st*|tail -1`; (10 Replies)
Discussion started by: Raynon
10 Replies