Search Results

Search: Posts Made By: sunnydanniel
14,125
Posted By sunnydanniel
how to get everything before the last delimiter?
hi all,

i have a string with a number of "/"s as delimiter.
and i want everything BEFORE the last delimiter

i know to use basename to get everything after the last delimiter.

thx a lot!
1,226
Posted By sunnydanniel
thanks for your reply. i mean the old fashion...
thanks for your reply.
i mean the old fashion .zip file
1,226
Posted By sunnydanniel
questions about updating a zip file
hi all,

I have millions of zip files about 200M each, and i'm trying to add a couple of small files(jpg txt etc.) into these zip files, less than 100k.

when i'm doing this, is it gonna unzip...
6,930
Posted By sunnydanniel
How to cut by delimiter, and delimiter can be anything except numbers?
Hi all,

I have a number of strings like below:

//mnt/autocor/43°13'(33")W/[N]


and i'm trying to get the numbers in this string, for example
43[tab]13[tab]33[tab]

please help

thanks...
2,412
Posted By sunnydanniel
Hi, thank you for the reply. i found that if...
Hi, thank you for the reply.
i found that if there are two lines which are both the shortest, nothing is returned. is there a way to solve this?
thanks!
2,412
Posted By sunnydanniel
how to find the shortest line which containing a key string?
hi all,

suppose a key string: M0271857

and to find all lines containing this key string in a text file

which returns multiple lines

but i only want the shortest one

is there a way to...
18,392
Posted By sunnydanniel
how to cut all string after the last delimiter?
hi all,

suppose a string:

abc/def/ghi/jkl/mn.txt

and i want to get the file name without the path.

however, different files have different paths, therefore the number of delimiter is...
1,379
Posted By sunnydanniel
it works great!!! thank you!
it works great!!!

thank you!
1,379
Posted By sunnydanniel
Thank you so much for your answer! But i have...
Thank you so much for your answer!
But i have some questions about your script.
The first line,
cat radar.awk
do you save the file as radar.awk or it has something to do with the awk command? ...
1,379
Posted By sunnydanniel
how to read strings from a txt and put them into a spreadsheet?
i have hundreds of thousands of txt files as below,

RADARSAT 1 SCENE DESCRIPTION

SCENE_ID c0005098
MDA ORDER NUMBER
GEOGRAPHICAL AREA CIS ScanSar...
10,886
Posted By sunnydanniel
grep works! thank you very much for so many...
grep works!

thank you very much for so many replies!
10,886
Posted By sunnydanniel
it returns: egrep: conflicting matchers...
it returns:

egrep: conflicting matchers specified

then, i tried

egrep "R1_980303_232712(2).tif" namelist.txt

no error messages out, but it fails to show me the line containing...
10,886
Posted By sunnydanniel
I tried this egrep -F R1_980302_105147(2)...
I tried this

egrep -F R1_980302_105147(2) namelist.txt

returns: -bash: syntax error near unexpected token `('

still no luck:confused:

any ideas? thanks!
10,886
Posted By sunnydanniel
thanks for your reply! however, problem...
thanks for your reply!

however, problem remains.
it returns error messages like: unterminated substitute in regular expression.

what i'm trying to do is update link path in these files...
10,886
Posted By sunnydanniel
pls help, file name with brackets
Hi all,

I have a number files like these below


R1_970804_125318
R1_970804_125404(2)
R1_980322_219282
R1_980301_210651(2)
R1_980301_210651(3)and I'm trying to put file names into a string...
3,083
Posted By sunnydanniel
delete first 2 characters for each line, please help
hi,

./R1_970330_210505.sard
./R1_970403_223412.sard
./R1_970626_115235.sard
./R1_970626_214344.sard
./R1_970716_234214.sard
...
...
...

for these strings, i wanna remove the ./ for each...
1,379
Posted By sunnydanniel
thanks for your reply i'm working on macos...
thanks for your reply

i'm working on macos 10.7.3, and the server is linux which i don't the exact version.
i suppose i'm not even close to windows
1,379
Posted By sunnydanniel
how to add text as the new first line without getting ^M?
hi all, first post here

how to add text as the new first line without getting the "^M"s in vim?

I've tries
echo "new_test" cat "file_to_be_edited" > new file

and
sed -i '1i\
new_test'...
Showing results 1 to 18 of 18

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