Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: avatar_007
872
Posted By avatar_007
Thank you so much! Beautifully explained...
Thank you so much!

Beautifully explained too!!
872
Posted By avatar_007
Hi Jim, Here is what I have tried but need to...
Hi Jim,
Here is what I have tried but need to be able to give variables as inputs to the echo statements and read those variables from the txt files.


#!/bin/bash

i=1
while read line;do
...
872
Posted By avatar_007
Text file manipulations
Hello All,

I have three txt files

***main.txt*****
code test
line code test3
asdfasdf
do for while

line1:

code test
line code test3
asdfasdf
do for while

line2:

code test
1,857
Posted By avatar_007
Thanks, but I have more than a 100 files with...
Thanks, but I have more than a 100 files with very different names.
1,857
Posted By avatar_007
Combining multiple column files into one with file name as first row
Hello All,

I have several column files like this

$cat a_b_s1.xls
1wert
2tg
3asd
4asdf
5asdf

$cat c_d_s2.xls
1wert
2tg
3asd
4asdf
5asdf
desired put put
$cat combined.txt
s1 s2
1,976
Posted By avatar_007
Could you please explain this ...
Could you please explain this


'$1=$1?p=$1:p'

Thanks
2,720
Posted By avatar_007
Thanks a lot for your help guys. ...
Thanks a lot for your help guys.

Scrutinizer: It works great. I will used the code tages from next time on..
12,859
Posted By avatar_007
have you tried $ split -l 10000 data.txt...
have you tried
$ split -l 10000 data.txt splitfi
2,720
Posted By avatar_007
print out missing files in a sequence
Hello all,

I have several directories with a sequence of files like this
IM-0001-0001.dcm
IM-0001-0002.dcm
IM-0001-0003.dcm
IM-0001-0004.dcm
IM-0001-0005.dcm

I would like to print out...
3,631
Posted By avatar_007
Rename files and directories with special characters
Hello guys,

I was looking for a shell script that removes all the special characters from the files and the subdirectories recursively. I could not locate it any more. Dose any body have a...
3,395
Posted By avatar_007
thank your for the quick reply rdcwayx but...
thank your for the quick reply rdcwayx

but how do i tar only the files from the list. There are many other files and subdirectories on the remote machine

---------- Post updated at 07:47 PM...
3,395
Posted By avatar_007
copying a list of files from one machine to another with the same path
Hello All,

I would like to download a list of files from a remote server to my local machine preserving the path i.e, create a similar directory tree.

ex:
files on the remote machine with...
2,335
Posted By avatar_007
split a line of a file and cat a file with another
Hi,

I have two files

one.txt
laptop
boy
apple

two.txt
unix
linux
OS
openS

I want to split one.txt into one line each and concatenate it with the two.txt

output files
onea.txt...
3,137
Posted By avatar_007
Hi danmero,, It dint work
Hi danmero,,


It dint work
1,653
Posted By avatar_007
Hi, Looks like GWAS data do you use...
Hi,

Looks like GWAS data
do you use PLINK? it has an option to do this

or you can do it using awk

awk 'FNR==NR {a[$1]++;next} $1 in a' file1 file2
3,137
Posted By avatar_007
search for an expression in a file and print the 3 lines above it
Hi,

I have a file like this

comment.txt
1.img
2.img
3.img
OK
x.img
y.img
z.img
not ok
1.img
2.img
3.img
bad
1.img
2.img
3.img
3,899
Posted By avatar_007
one more request
Thanks a lot to rdcwayx and drewk

sending the same file two times was a smart idea

but what if i have some thing like this a string attached to the key word

apple abc cat wegsdfg...
3,899
Posted By avatar_007
i just started to lean awk and it would be nice...
i just started to lean awk and it would be nice if I have a solution to this in awk
but perl is fine too
3,899
Posted By avatar_007
Hi, Occasionally some words repeat and also...
Hi,

Occasionally some words repeat and also there wont be a match for certain cells in col2

I know that we can extract the contents matching two different files
using

awk 'FNR==NR...
3,899
Posted By avatar_007
match and sort using awk
Hello,

Is it possible to do match and sort the data from two fields in a file using awk?


Like for example:
input
apple cat
in rat
out sky
cat pen
rat ball
sky cpu
pen linux...
2,382
Posted By avatar_007
Thank you Tyler, could you please explain...
Thank you Tyler,

could you please explain your code a little bit. its doing the right thing but i am kind of confused

This is how I did but it involved a lot of steps and few manual edits as...
5,409
Posted By avatar_007
cat test.txt | tr '\n' ';' |sed 's/END;/\n/g' ...
cat test.txt | tr '\n' ';' |sed 's/END;/\n/g'
abc;def;ghi;jkl;mno;
pqr;stu;vwx;yz;123;
2,382
Posted By avatar_007
Moving files to their respective subdirectories
Hello,

I have files like this

img.txt
./Rearrange_zoca/fitted_data/WX226_05b_Ncere.jpg
./Rearrange_zoca/fitted_data/w322_03B_60_70.jpg
./Rearrange_zoca/fitted_data/wrx226_12A_50_60.jpg...
Showing results 1 to 23 of 23

 

Featured Tech Videos

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