Search Results

Search: Posts Made By: juliette salexa
Forum: Programming 11-10-2010
2,022
Posted By juliette salexa
can't find sql file
Hello everyone,
does anyone know anything about SQL ?

I applied the command: mysql -u james -p

And then the sql command:

insert into james.username set username="a";

And I presume the...
1,374
Posted By juliette salexa
Error in sed
Hello,

I want to remove .txt from every file name:


for file in *.txt; des=$(echo $file | sed 's/\.txt//'); mv "$file" "$des"; done

but this gives me:

bash: syntax error near...
5,145
Posted By juliette salexa
Thank you very much Scottn, I actually had...
Thank you very much Scottn,

I actually had to reverse the order of those substitution commands to make it work (because removing the 0 first, causes the last character to be preceded by '_copy' ...
5,145
Posted By juliette salexa
conditional renaming of files
Hello,

I want to rename all the files in my directory according to the following criterion:

IF the original filename does not end in 0
THEN rename the file to "original filname" but with the...
1
2,624
Posted By juliette salexa
OUTF
Hello,

How do I find out what OUTF means in:


OUTF=rem-duplicates.sh;
echo "#! /bin/sh" > $OUTF;
17,276
Posted By juliette salexa
grep only first line
Hello,

I have a folder with several files, and I want to find which files have the string "test" in the FIRST line. I also don't want it to waste time searching in lines other than the first line...
3,237
Posted By juliette salexa
Thank you, Is there a way to find all the...
Thank you,

Is there a way to find all the lines that have at least one, but LESS than 5 instances of the symbol | ??

Or is there a way to count the number of lines that egrep returns as the...
2,394
Posted By juliette salexa
isolate unique files in a folder
Hello,

I have two folders.
One has 1183 text files (folder A).
The other (folder B) has 1160 of those 1183 files (the contents in these 1160 files are identical to the contents in the...
3,237
Posted By juliette salexa
grep with quantity
Hello,
is there a way to find a list of all files in my folder that have 5 instances of the symbol | ??

grep "|" *.* would give me all files that have one isntance of |

Is there a way to...
3,300
Posted By juliette salexa
Thank you Anbu23, Though your method worked...
Thank you Anbu23,

Though your method worked perfectly for a simple test case that I made, it encountered a serious problem for the set of files I am working with.

For one of the files, the...
3,300
Posted By juliette salexa
Renaming duplicate files in a loop
Hello,

I have a bunch of files whose names start with 'xx'
The first line of each file looks something like:

a|...|...|...|... , ...


In order to rename all of these files to whatever's...
24,497
Posted By juliette salexa
omit strings from grep result
Hi,

I know this is a really dumb question, and I used to know how to do this, but I forgot and I can't seem to find the command online anywhere:

When I grep a string, how do I filter the...
4,450
Posted By juliette salexa
Thank you very much chipcmc! This worked...
Thank you very much chipcmc!

This worked perfectly once I removed the quotations around a* in your code,
Having the quotes there gave me error messages, maybe I have a different version of UNIX...
4,450
Posted By juliette salexa
loops with tr
Hello,

I'm not sure if this is more appropriate for the 'unix for dummies' or the 'unix for experts' forum because I'm new to this forum and this is the second topic I've discussed, but if you...
15,581
Posted By juliette salexa
My gosh I did not realize you replied to my last...
My gosh I did not realize you replied to my last message!

I was checking a few times per day and scrolling down and kept seeing my last message still at the bottom.... and I didn't notice that I...
15,581
Posted By juliette salexa
Thank you so much Smiling Dragon! I finally...
Thank you so much Smiling Dragon!

I finally got a chance to try this.
I just realized that I made a mistake in the question I originally asked.

This code you suggested:

for file in xx*; do...
15,581
Posted By juliette salexa
Oh I'm so sorry! I missed everything below your...
Oh I'm so sorry! I missed everything below your quoted portion!
* I'm still new to this forum! *

I didn't realize you had particular file names,
The filenames generated by csplit are in the...
15,581
Posted By juliette salexa
Thank you very much Smiling Dragon for your...
Thank you very much Smiling Dragon for your response.

How do I apply that command ??

I just apply it like any command in UNIX ?? (like for example 'mkdir name' ) ??

I tried that exact...
15,581
Posted By juliette salexa
naming files that csplit creates
Hi,
This is my first time on this forum..
I searched the previous answers, but didn't find the answer I was looking for at first glance.

csplit works beautifully for me, except for one thing. My...
Showing results 1 to 19 of 19

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