Search Results

Search: Posts Made By: ali.seifaddini
1,388
Posted By ali.seifaddini
Terminal shows: mv...
Terminal shows:


mv SG1130113001247.CAPNFXT.csv 130113001247.csv
mv SG1130113002247.CAPNFXU.csv 130113002247.csv
mv SG1130113003246.CAPNFXV.csv 130113003246.csv
mv SG1130113004247.CAPNFXW.csv...
1,388
Posted By ali.seifaddini
Yes, I already added path name. but nothing...
Yes, I already added path name. but nothing happened.



#! /bin/bash

cd /root/Desktop/rename

for file in SG1*.CAP*
do
new=${file#SG1}
new=${new%.CAP*}
if [ -f "$new" ]
...
1,388
Posted By ali.seifaddini
Hello I run the script, but noting happened...
Hello

I run the script, but noting happened !!!

---------- Post updated at 07:12 AM ---------- Previous update was at 07:11 AM ----------




Hi

Not working!!!!
1,388
Posted By ali.seifaddini
Rename Filenames
Hi there

I have thousands files like:


SG1130113000247.CAPNFXS
SG1130113001247.CAPNFXT
SG1130113002247.CAPNFXU
.
.
.


I want to remove SG1 and .CAP* from file name, and rename it to:...
1,462
Posted By ali.seifaddini
I added comma in script, and it works fine....
I added comma in script, and it works fine. Thanks you so much.


awk 'BEGIN {OFS = "\t"; HD=OFS","OFS}
FNR == 1 {HD=HD OFS FILENAME}
FNR == NR {a[$2 " " $3] = $1;...
1,462
Posted By ali.seifaddini
Thank you for your responding. But your code...
Thank you for your responding. But your code didn`t work well.

the result:

SG1130113000247.CAPNFXS.csv.csv SG1130113001247.CAPNFXT.csv.csv SG1130113002247.CAPNFXU.csv.csv...
1,462
Posted By ali.seifaddini
Insert FileName to headers
hi there

I have a lot of files with same number of rows and columns.$2 and $3 are the same in all files .
I run awk script and merge $2,$3,$1 from first file and $1 from another files.

I would...
3,240
Posted By ali.seifaddini
What about extra columns?
What about extra columns?
3,240
Posted By ali.seifaddini
Hello sir Is it possible to run the script with...
Hello sir
Is it possible to run the script with sample files which I attached on the above message.
There are some extra columns and the rows disarranged.
Regards.
3,240
Posted By ali.seifaddini
Hello sir Something is wrong with the script...
Hello sir

Something is wrong with the script because there are some extra columns and also rows are miss ordered.
I attached sample data for your try.

Thank you so much.
5767
3,240
Posted By ali.seifaddini
Hi Thanks for your response. I have 144...
Hi
Thanks for your response.
I have 144 files. Is it needed to put all files one by one in the script? (File1 file2...). How can be used loop for this script?
And also it is important assign name...
3,240
Posted By ali.seifaddini
Merge columns from multiple files
Hello and Good day

I have a lot of files with same number of rows and columns.$2 and $3 are the same in all files .
I need to merge $2,$3,$6 from first file and $6 from another files.

File1:...
4,561
Posted By ali.seifaddini
Hi friend Thanks for your consideration. ...
Hi friend
Thanks for your consideration.

when I run the code without copy the results, it is ok.


#! /bin/bash
FILES=/root/Desktop/decoder/input/*
for f in $FILES
do
awk '{$6=($1-64)/2...
4,561
Posted By ali.seifaddini
Hi First of all thanks for your response. ...
Hi
First of all thanks for your response.

-I changed uppercase letter to lowercase, but not working again!
-I already run awk script lonely, its ok.
-The cod is not working, because it can not...
4,561
Posted By ali.seifaddini
Loop through files in a directory
Hello

How do I loop through files in a specific directory ?

This script is not working!


#! /bin/bash
FILES=/usr/desktop/input/*
For f in $FILES;
do
awk '-v A="$a" -v B="$b"...
1,356
Posted By ali.seifaddini
Yesssss. The first problem has beeen solved. I...
Yesssss. The first problem has beeen solved. I appreciate your help. Thank you so much Yoda.
1,356
Posted By ali.seifaddini
How to input parameters and add Columns?
Hello and good day

I am not familiar with programming. I have text files and I would like to:

1) edit script to input "a" and "b" parameters by users

2)put input directories in loop : ...
Showing results 1 to 17 of 17

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