Hey all, been so long since I've done any KSH scriptting, I've forgotten exact sytax. 2 things,
1) I need to dot in an environment file that is a list of server names
2) I need to loop through though server names in a while loop, or until loop.
Here's roughly what I have and trying to hammer out... (2 Replies)
Hi there!
I have 150 txt files named chunk1, chunk2, ........., chunk150. I have a second file called string.txt with more than 1000 unique strings, house, dog, cat ... I want to know which command I should use to count how many times each string appears in the 150 files.
I have tried... (4 Replies)
Hi again
I have the follwing - cat ~/ABCFILE | grep "$SYSTEM" | grep "$USERNAME"
What I'm looking to do is have the variable for $SYSTEM determined by the user making a selection from a numbered list. So, input 1 would be system ABC etc.
I'm very puzzled as to how to go about this?
Any... (3 Replies)
I will be very grateful if someone can help me with bash shell script that does the following:
I have a list of filenames:
A01_155716
A05_155780
A07_155812
A09_155844
A11_155876
that are kept in different sub directories within my current directory. I want to find these files and copy... (3 Replies)
Hi all,
I couldn't find an answer for this easy question, probably because the keywords I used in the search are too generic.
I just want to make a list of numbers using the value of a variable, like this:
NumFiles=$(ls | wc -l)
for i in {1..$NumFiles}; do
Say $NumFiles = 5. Bash... (3 Replies)
I have a file 1.txt with the below contents.
-----cat 1.txt-----
1234
5678
1256
1234
1247
-------------------
I have 3 more files in a folder
-----ls -lrt-------
A1.txt
A2.txt
A3.txt
-------------------
The contents of those three files are similar format with different data values... (8 Replies)
I have a script to create a variable from a list, B.txt and then search it in another file, file.txt and then print the pattern line and next line.
#!/bin/bash
while read a
do
echo "$a" | grep -A 1 $a file.txt > $a\.txt
done < B.txt
I always get that no such file or directory exists... (6 Replies)
Hello,
I have a folder with a massive amount of files, and I want to copy out a specific subset of the files to a new directory. I would like to use a text file with the filenames listed, but can't get it to work.
The thing I'm hung up on is that the folder names in the path can and do have... (5 Replies)
Hello Gurus,
Im new to scripting. Got struck with a file merge issue in Unix. Was looking for some direction and stumbled upon this site. I saw many great posts and replies but couldnt find a solution to my issue. Greatly appreciate any help..
I have three csv files -> Apex_10_Latest.csv,... (1 Reply)
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)