10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to use grep to find files that have newlines in the filename. For example, I have a directory where I create three files:
$ touch file1
$ touch "file 2"
$ touch "file
> with
> newlines"
$ find
.
./file 2
./file1
./file?with?newlinesI now want to pipe the find output into grep and... (4 Replies)
Discussion started by: Ralph
4 Replies
2. Shell Programming and Scripting
Hi,
I am wanting to create a script that will construct a SQL statement based on a a space delimited string that it read from a config file.
Example of the SQL will be
For example, it will read a string like "AAA BBB CCC" and assign to a variable named IN_STRING.
I then concatenate... (2 Replies)
Discussion started by: newbie_01
2 Replies
3. Shell Programming and Scripting
Hi,
In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this?
I am using #!/bin/ksh
For eg: sftp user@host <<EOF
cd /path
get *.txt
rename *.txt *.txt.done
... (7 Replies)
Discussion started by: jhilmil
7 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have two files file1 and file2 with these contents
cat file1
AAAAA 01/03/2014 04:01:23
BBBB 01/03/2014 03:03:34
CCCcc 01/03/2014 03:03:34
cat file2
1 RED
1 HHHH
1 TTTT
1 BBBBB
I tried the below... (2 Replies)
Discussion started by: Aditya_001
2 Replies
5. Shell Programming and Scripting
Hi all,
I have source file, data looks like
12345 abc def 01 / 001200 C 2000
12345 abc def 01 / 001200 C 2500
12345 abcd def 01 / 001200 C 3500
18945 xyz pqr 01 / 009900 D 4000 5000 2800 9900
Expected ouput... (3 Replies)
Discussion started by: srk409
3 Replies
6. Shell Programming and Scripting
Hi All,
I was wondering how I can convert each line in an input file where fields are separated by variable width spaces into a CSV file. Below is the scenario what I am looking for.
My Input data in inputfile.txt
19 15657 15685 Sr2dReader 107.88 105.51... (4 Replies)
Discussion started by: vharsha
4 Replies
7. Shell Programming and Scripting
Hi,
I have a text file with the following format. Some of the fields are blank.
1234 3456 23 45464 327837283232 343434
5654353 34 34343 3434345 434242
....
....
....
I need to convert this file to a CSV file, like
1234, ,23, ... (3 Replies)
Discussion started by: wintersnow2011
3 Replies
8. Shell Programming and Scripting
Hi All,
I have a file which looks like this:
abc 3456
computer 3214
printer 0.9823
computer 3214
Can anyone please let me know how I can format my text like this?
abc 3456 computer 3214 printer 0.9823 computer 3214
I know how to space to newlines using tr but don't know how to do... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies
9. Shell Programming and Scripting
Hi All
I have a folder that contains hundreds of file with a names
3.msa
4.msa
21.msa
6.msa
345.msa
456.msa
98.msa
...
...
...
I need rename each of this file by adding "core_" in the begiining of each file such as
core_3.msa
core_4.msa
core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I need help how to renaming multiple file. The original file look like this;
Test Monday.txt
Test Wednesday.txt
Test July.txt
I have more than hundred file in the directory.
How i want to rename all file to a new file name in one time? The new file maybe the same name e.g.... (13 Replies)
Discussion started by: nazri76
13 Replies