10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
2. Programming
I need to copy a file (srcFile) to a new ubication (destFile). Then I calculate the size of the copy file using stat. The problem is that I always get a cero size value although the file has not cero size in the hard disk.
The source code that does this is :
PROGRAM 1:
char srcFile;... (4 Replies)
Discussion started by: clxspain
4 Replies
3. Shell Programming and Scripting
I am reading a pipe delimted file having the 4 columns. The file content looks like
APT|string|Application ID For App|value
for env in `cat $ConfigFile`
do
name=`echo $env | cut -d '|' -f1`
type=`echo $env | cut -d '|' -f2
prompt=`echo $env | cut -d '|' -f3`
... (5 Replies)
Discussion started by: chandu123
5 Replies
4. Shell Programming and Scripting
Hi,
I have a small grepping problem in my script.I am having a file from which i need to make sure "#^A17" is the last updation (Next # can be ignored) before ################.The idea behind this is, if this file contains "A17" as the last updation, i need to do a particular activity. please... (7 Replies)
Discussion started by: Renjesh
7 Replies
5. Shell Programming and Scripting
how can i split a file on last record ? say i have a file A with 4 records as follows :
first line
second line
third line
last line
I want to make two files B and C
with contents of B as
first line
second line
third line
and the contents of C as
last line (8 Replies)
Discussion started by: aliyesami
8 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need unix code to check the size of a file. for example if the size of the file in A folder is more than 1BM, then i have to move that particular file in to B folder whenever I run that particular script.
regards,
Srinivas. (7 Replies)
Discussion started by: vysrinivas
7 Replies
7. UNIX for Advanced & Expert Users
--------------------------------------------------------------------------------
hy guys,
i got few interview questions i need someone to answer urgently:
1)If you cant get to the root, you try to fsck it, but gets errors to read file systems. What steps do you take to recover the host... (1 Reply)
Discussion started by: charneet
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
To delete some text in 2 files in line1 ( not complete line) in unix without opening the files.
For example: source file is like this
<?xml version="1.0"... (5 Replies)
Discussion started by: pyaranoid
5 Replies
9. Shell Programming and Scripting
Hi,
I am new to shell scripting.
I have one .txt file whose name is status.txt
Now i want to read the contents of this file in a variable.
status.txt file contains the following input
1.xml
2.ps
3.pdf
now i want to read this status.txt file. Can anybody please help me to write a... (2 Replies)
Discussion started by: sunitachoudhury
2 Replies
10. Shell Programming and Scripting
Ok I admit it I am stumped and I would appreciate any and all help
Here is what I am trying to do.
Korn Shell script
I am setting a variable to another shell script that I want to invoke in my main script like so:
GETDIR=/vol100/cfg/.getdir
The .getdir shell script take a parameter,... (4 Replies)
Discussion started by: Batch
4 Replies