Search Results

Search: Posts Made By: Byrang
7,231
Posted By ananthap
#! bin/bash echo "Enter desired file" read...
#! bin/bash
echo "Enter desired file"
read "$file"
if [ ! -f $file ] ; then
touch $file #this will create the file
fi
vi $file

Please use code tags
7,231
Posted By ahamed101
Use code tags Try this #! bin/bash ...
Use code tags

Try this


#! bin/bash
echo "Enter desired file"
read "$file"
if [ ! -f $file ] ; then
touch $file #this will create the file
fi

And do you mean by retrieve the file?...
2,904
Posted By Corona688
That's also not valid syntax, I'm not sure what...
That's also not valid syntax, I'm not sure what it's supposed to do either.

I'll tackle it in parts instead.

for NAME in /etc/*
do
echo $NAME
done This would print every folder or...
2,904
Posted By Corona688
Nothing -- it's syntactically invalid. Here's...
Nothing -- it's syntactically invalid. Here's how you fix it:
#!/bin/bash
# false is a program that always returns a nonzero value.
# if considers nonzero as fail, so this
# You can't just put...
Showing results 1 to 4 of 4

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