Sponsored Content
Top Forums Shell Programming and Scripting Logic to separate the first name in the file Post 302999497 by Corona688 on Wednesday 21st of June 2017 12:27:58 PM
Old 06-21-2017
To repeat: Do not name a function test -- ever. Name it test2 if you have to, never test. There's a real command named test which will pop up when you're not expecting it.

This is redundant:
Code:
for p in $(ls *.rpm 2>/dev/null);do

Just do:
Code:
for p in .rpm ;do

I have no idea what that esac is doing as you're not using case, that's got to be a syntax error.

I think you mean popd >/dev/null 2>/dev/null not popd &>/dev/null.

I think you mean [ -e ../info/$VAR.list ] not [ -e /info/$VAR.list} ]

How about
Code:
cat ../info/* > outputfile

 

We Also Found This Discussion For You

1. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy