Search Results

Search: Posts Made By: lalelle
3,522
Posted By lalelle
Merge two lines
Hi
I have two lines of data formatted as displayed below

shop, price, remark, date
a,#N/A,order to -fd, 20091011


and would like it to be
shop:a
price:#N/A
remark:order to -fd...
1,647
Posted By lalelle
thanks that's good stuff but columns are not...
thanks that's good stuff but columns are not fixed so it could be
2009/03/30 23:11:34.553 DFP
2009/03/30 23:11:34.553 DFP 12[1.24] [1.3]
2009/03/30 23:11:34.553 Pctreas no remark [2.3] (obsolete)...
1,647
Posted By lalelle
How to replace and amend value in the same time
2009/03/30 08:11:34.553 DFP
2009/03/30 08:11:36.861 PLO

I want it to be

2009/03/30 09:11:34.553 DFP
2009/03/30 09:11:36.861 PLO

and
2009/03/30 23:11:34.553 DFP
2009/03/30...
13,874
Posted By lalelle
sorry I meant /tmp/folder2 will contain...
sorry I meant

/tmp/folder2 will contain ONLY /tmp/folder2/a and /tmp/folder2/b
13,874
Posted By lalelle
How to copy one folder to another with existing files
For example,

/tmp/folder1
includes /tmp/folder1/a /tmp/folder1/b

/tmp/folder2
includes /tmp/c

Is there a command without removing files in /tmp/folder2 first to copy the /tmp/folder1 to...
5,691
Posted By lalelle
actually the second column could be anything but...
actually the second column could be anything but in the same format. so sort can't do this???
5,691
Posted By lalelle
Sort complicated two fields
Hi experts,

I am trying sort command with my data but still not getting the expected results.

For example, I have 5 fields data here

c,18:12:45,c,c,c
d,12:34:34,d,d,d
a,13:50:10,a,a,a...
2,085
Posted By lalelle
how to sort the file in this case? which column...
how to sort the file in this case? which column is to be sorted?
Thanks
2,085
Posted By lalelle
Column matched in two files
I have two files with multiple columns separated by commas.

I want to search one column from the first file in the second file;
If there is a matching, will append that matched row to the first...
11,672
Posted By lalelle
Thanks a lot The text in file can be dynamic. ...
Thanks a lot
The text in file can be dynamic.
aa,bb,cc
aa,bb,cc,dd,dfas,(dfd,d)df,df,afd
dafk
fads,df,dafa,dfa
a,d,d,f,g(1,1)fd
11,672
Posted By lalelle
Replace text in parentheses
Hi

I would like to replace a comma in parentheses to a semicolon for example. Other commas outside () stay unchanged. How can I do this?

aaaa,bbb,ccc,ddd(eee,fff,ggg),hhh,iii
to...
3,011
Posted By lalelle
yes the equal sign that I do not want to remove...
yes the equal sign that I do not want to remove is in parentheses.
3,011
Posted By lalelle
It could be anything not just var=. :( Thanks...
It could be anything not just var=. :(
Thanks guys such a quick response
3,011
Posted By lalelle
Thank you very much that helps however, ...
Thank you very much that helps
however,
There are some occasions that the equal sign can be inside a text....
3,011
Posted By lalelle
Find information from complicated strings
Hi experts,

I have the file with these lines:
var1=thu_13:12:32,var2=Microsoft,var3=240ms,var4=Mozilla/4.0_(sun;_MSIR_3-4;_windows.;_NET_1.1323.53...
27,420
Posted By lalelle
if [ -f /etc/passwd ] works fine. So the question...
if [ -f /etc/passwd ] works fine. So the question is down to why doesn't -e work?

Thanks again
27,420
Posted By lalelle
I tried sh ./test.sh. it showed the same error.
I tried sh ./test.sh. it showed the same error.
27,420
Posted By lalelle
My code is so basic as it is exactly as below...
My code is so basic as it is exactly as below called test.sh
#!/bin/bash
if [ -e /etc/passwd ]
then
echo thennnn
else
echo elseeee
fi

I run it by calling sh test.sh or sh -x test.sh. What...
27,420
Posted By lalelle
Yes I have been written this kind of code for a...
Yes I have been written this kind of code for a hundred scripts but I dont know it shows errors this time...Is it something about the shell in Solaris but I tried both ksh and bash; it gave the same...
27,420
Posted By lalelle
test: argument expected
+ [ -e /etc/passwd ]
test.sh: test: argument expected

#!/bin/bash
if [ -e /etc/passwd ]
then
echo thennnn
else
echo elseeee
fi

why does it show this error? Clearly from...
Forum: Solaris 02-04-2008
38,659
Posted By lalelle
Find server details
Hi experts
Is there a command or a way in Solaris to find server details like this:

SUN240R
2 @ 160MHz CPU
1Gb memory
Solaris8
lan0 (16SV LAN) 100FD
lan1 (45CI LAN) 100FD
lan2 (8CON LAN)...
1,965
Posted By lalelle
Replace a string containing :/=\ in files
I have read many forums about replacing a string in file.
I tested but it doesn't work with my string

For example I want to replace =x=ks24Y\:LOP= with h\P6qwx:aUE/.

Thank you
10,728
Posted By lalelle
How to copy from standard input
I tried copy the output files from find command into a directory.
Example,
find / -name core 2>/dev/null | xargs cp????

I have known that we can use xargs to execute command lines from standard...
53,502
Posted By lalelle
Actually, it is nothing I want to do. I am...
Actually, it is nothing I want to do. I am starting to learn unix and I am trying many possible ways to make myself understood as much as possible. Therefore, this question came up when I compare a...
53,502
Posted By lalelle
When you call a function in ` ` or $( ), the...
When you call a function in ` ` or $( ), the child process is spawned. Am I right?
Therefore, the statement echo "read command" does not print out to the shell I am running the script. How can I...
Showing results 1 to 25 of 43

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