LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to cut a column from a file that's requested by a user (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-cut-a-column-from-a-file-thats-requested-by-a-user-4175433399/)

demet8 10-21-2012 07:07 PM

How to cut a column from a file that's requested by a user
 
This is what I need to do:

cut a column from a file called example_1 that's requested by the user. The script will prompt for a field that will become a
variable used to cut the field requested.

This is what I have tried and it hasn't worked. How can I simply this issue.

@ a = cut -c
echo -n "enter a field to cut "
set b = $<

@d = $a , $b

echo $d

chrism01 10-21-2012 07:32 PM

Which language is this? It looks similar to eg bash, but not valid syntax.
If you did mean bash, have a look at these
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/

demet8 10-21-2012 07:45 PM

It's csh. I will take a look at what you posted. Thank you.

chrism01 10-21-2012 07:58 PM

Re csh

http://www.grymoire.com/Unix/CshTop10.txt
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/


All times are GMT -5. The time now is 04:54 AM.