Search Results

Search: Posts Made By: jingi1234
5,388
Posted By jingi1234
Count the distinct list of ids
Hello guys,

I have a file in the following format(each line seperated by TAB):
=========
Filename id
Filename id1
Filename id
Filename1 id7
Filename1 id7
Filename2 id1
Filename2 id1...
6,443
Posted By jingi1234
Problem with cat with PERL Substitute
system("cat FILENAME | perl -e 'while(<>) { print $_;}'");

system("cat FILENAME | perl -e 'while(<>) { $_ =~ s/XXX/YYY/g; print $_;}'");

First command works fine but second command gives the...
16,583
Posted By jingi1234
I have to do testing and each time I test I have...
I have to do testing and each time I test I have to delete certain directories. Every time something go wrong then I have re-do the whole thing.


Anyway thanks for trying to help.

- Jinig
16,583
Posted By jingi1234
Delete a directory - very fast
Hi,
I have a directory which has 1000 other directories and files inside them. I want to delete the base direcotry very fast.

Ex: I have

/home/xxx/some/some1
/home/xxx/some/some2...
4,641
Posted By jingi1234
How do I get a tab character?
How do I get a tab character?
49,477
Posted By jingi1234
What if I have a tab followed by number of...
What if I have a tab followed by number of spaces...

I want to remove all the spaces before and after tab..

Please help
8,892
Posted By jingi1234
Gurus, Please help
Gurus,
Please help
8,892
Posted By jingi1234
What if the file has "tab" [\t] as a delimter?...
What if the file has "tab" [\t] as a delimter? what should i change in the nawk?

Please help
8,892
Posted By jingi1234
Can 120 be a varaible? I mean variable=12 ...
Can 120 be a varaible? I mean

variable=12

awk 'BEGIN{n=$variable}{printf("%s%s\n",n++,$0)}' infile > outfile

??

The aboe statement doesn't work if it is variable..what is the work around?
8,892
Posted By jingi1234
inserting uniq sequential numbers at the start of the file
Hi Unix gurus,
I have a file. I need to insert sequential number at the starting of the file. Fields are delimited by "|". I know the starting number.


Example:

File is as follows
...
6,569
Posted By jingi1234
grep 'EXTRACT TEXT' BIGFILE > SMALLFILENAME
grep 'EXTRACT TEXT' BIGFILE > SMALLFILENAME
415,945
Posted By jingi1234
I see lot of Control I characters which were not...
I see lot of Control I characters which were not visible with out :set list


Thanks Unix Gurus :D :D :D
415,945
Posted By jingi1234
When I say: vim FILENAME ksh: vim: not...
When I say:

vim FILENAME
ksh: vim: not found

emacs FILENAME
ksh: emacs: not found

:confused:
415,945
Posted By jingi1234
How can I use vim? :( I tried vim filename...
How can I use vim? :(

I tried vim filename and it doesn't work. :confused:

and same with emacs.? :rolleyes:

Please help
415,945
Posted By jingi1234
how to see special characters in a file using vi
Hi,
I have a file which has special characters. I can't see them when I "vi" the file. But I am sure there are some special un seen characters. How can I see them?

Please help.

Thx
2,829
Posted By jingi1234
Get un common numbers from two files
Hi,
I have two files:

abc :

50040
123123
31703

cde:

104
97
50040
123123
31703
36609
50534
2,327
Posted By jingi1234
Hi all, I am getting the following error: ...
Hi all,
I am getting the following error:

awk: record `SMAU,9628,SYDBUL083F...' has too many fields :confused:

Please help. Try the above scripts with 187 commas (required)

Thanks
2,327
Posted By jingi1234
Question on files - adding commas at the end
Hi All,
I have a file. Each line suppose to contain 188 fields delimited by , (comma --> so 187 commas) but some records have less than 188 fields which needs to be filled by additional commas at...
49,012
Posted By jingi1234
Vino, See below: sed -V sed: illegal...
Vino,
See below:

sed -V
sed: illegal option -- V

??????? :confused: :confused: :confused:
49,012
Posted By jingi1234
cat 1 /.//.//./ /.//.//./ /.//.//./ ...
cat 1
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./

sed -e 's#\(\/\.\/\)*#\1#g' 1 > 2

cat 2
/.//.//./
/.//.//./
/.//.//./...
49,012
Posted By jingi1234
Please see below: cat 1 gives: ...
Please see below:

cat 1 gives:

/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./
/.//.//./

sed -e 's#\.\{1,\}#\.#g' 1 > 2

now see cat 2
...
49,012
Posted By jingi1234
Thanks vino. But this doesn't work. I am...
Thanks vino.

But this doesn't work. I am looking for /./* (one or more of /./ and replace with a single /./

I tried dereferencing . and /
it doen't work. Please help.

Thanks
49,012
Posted By jingi1234
How can I match . (actual dot) using sed?
Hi All,
How can I match . (actual dot) using sed? Please help.

Thanks
43,959
Posted By jingi1234
grep -v '^$' file_name > file_name.$$ mv...
grep -v '^$' file_name > file_name.$$

mv file_name.$$ file_name


Hope this helps,
Jingi
Forum: What is on Your Mind? 08-02-2005
2,753
Posted By jingi1234
Some suggetion needed on taking a new job
Hi All,
Please give your valuable advice on this. Recently I went to an interview a for a Sybase, Perl and K-shell scripting. I am not worried about the scripting and I love it. I am working in...
Showing results 1 to 25 of 48

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